To place event conversion code in order successful thank you page
Add this code on order confirm page of website in head section.
need to add in dynamic format not static
To place event conversion code in order successful thank you page
Add this code on order confirm page of website in head section.
need to add in dynamic format not static
This is a very vague post. Please provide some more information about what you’re trying to acheive.
correct below:
I need to add this event snippet(dynamic format) on the order success / thank-you page for SEO & conversion tracking purposes.
Our site plan is Basic Shopify.
I also tried adding this in Customer Events → Custom Pixels:
analytics.subscribe(“checkout_completed”, event => {
const checkout = event.data.checkout || {};
const transactionId = checkout.order?.id || ‘’;
const value = checkout.totalPrice?.amount || checkout.subtotalPrice?.amount || 0;
const currency = checkout.currencyCode || ‘AUD’;
// Push dynamic purchase info to dataLayer
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "purchase",
transaction_id: transactionId,
value: value,
currency: currency,
gads_send_to: "AW-1071757768/0EEPCNCc9_EYEMjzhv8D"
});
console.log("Custom Pixel fired:", {
transaction_id: transactionId,
value: value,
currency: currency
});
});
the event fired when check console but not reflecting in google tag assistant extension
SEo team not find any event entry for purchase order.
I tested by placing a real order, but I don’t see the purchase event in Google Tag Assistant / Google Ads.”