// ==================================================
// Nuclear Fancy Pants Edition™
// File: /home/ploi/automarketer-ai.com/public/wp-content/plugins/automarketer-ai/assets/js/amai-product-tracker.js
// Description: Fire-and-forget product view ping to AJAX handler - NUCLEAR+++
// Last Edited: 2026-05-16
// ==================================================

(function ($) {
    'use strict';

    $(function () {
        if (typeof amaiTracker === 'undefined') {
            return;
        }

        $.post(amaiTracker.ajaxurl, {
            action:     'amai_track_product_view',
            nonce:      amaiTracker.nonce,
            product_id: amaiTracker.productId
        });
    });
}(jQuery));