How to place event conversion code

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.

Code:

I also tried adding this through 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 fires in the console, but it does not appear in the Google Tag Assistant extension.
Our SEO team cannot see any purchase conversion entries in Google Ads.

How to resolve this ?

Did you switch your store to the new Customer Account checkout profile?

If so, that may be the issue. The checkout object isn’t available in the new version of the Customer Accounts pages (like Thank You / Order status). I believe there is a different way to include pixels.

There’s an example here with Google Tag Manager: https://help.shopify.com/en/manual/promoting-marketing/pixels/custom-pixels/gtm-tutorial

//subscribe to events
analytics.subscribe("checkout_completed", (event) => {
  window.dataLayer.push({
    event: "checkout_completed",
    timestamp: event.timestamp,
    id: event.id,
    token: event.data?.checkout?.token,
    url: event.context.document.location.href,
    client_id: event.clientId,
    email: event.data?.checkout?.email,
    phone: event.data?.checkout?.phone,
    first_name: event.data?.checkout?.shippingAddress?.firstName,
    last_name: event.data?.checkout?.shippingAddress?.lastName,
    address1: event.data?.checkout?.shippingAddress?.address1,
    address2: event.data?.checkout?.shippingAddress?.address2,
    city: event.data?.checkout?.shippingAddress?.city,
    country: event.data?.checkout?.shippingAddress?.country,
    countryCode: event.data?.checkout?.shippingAddress?.countryCode,
    province: event.data?.checkout?.shippingAddress?.province,
    provinceCode: event.data?.checkout?.shippingAddress?.provinceCode,
    zip: event.data?.checkout?.shippingAddress?.zip,
    orderId: event.data?.checkout?.order?.id,
    currency: event.data?.checkout?.currencyCode,
    subtotal: event.data?.checkout?.subtotalPrice?.amount,
    shipping: event.data?.checkout?.shippingLine?.price?.amount,
    value: event.data?.checkout?.totalPrice?.amount,
    tax: event.data?.checkout?.totalTax?.amount,
  });
});