Need help with Google dynamic remarketing tag code for Shopify?

Topic summary

Implementing Google Ads dynamic remarketing on Shopify (theme.liquid and checkout) with correct parameters and placement. The shared approach relies on code from a Google Shopping guide and linking Google Analytics (GA) to Google Ads.

Key setup details:

  • Use GA/gtag with custom dimensions for ecomm_prodid, ecomm_pagetype, ecomm_totalvalue and map them to Google Ads dynamic attributes. Insert code in Shopify’s Additional Google Analytics JavaScript and Checkout Additional Scripts as needed.
  • For checkout, send a conversion event and a dynamic remarketing event with ecomm_prodid list, ecomm_pagetype=purchase, and ecomm_totalvalue.

Points of contention/clarifications:

  • “Home” pagetype: advised as low-value for dynamic remarketing; build a GA audience for homepage visitors instead.
  • For gtag page_view items, the id and value must match your Merchant Center feed: ensure the product ID format in code (e.g., product_id, variant_id, sku with any prefixes) exactly matches the feed. Mismatches cause errors like “98% of id values didn’t match your feed.”

Latest updates:

  • Reports of no hits for ecomm_*; guidance is to verify ID structure alignment with the feed.
  • An app was suggested to automate correct parameters; question remains whether it cleans up existing code.

Status: Ongoing; core unresolved items are exact dynamic values for id/value per feed and code cleanup strategy.

Summarized with AI on January 4. AI used: gpt-5.

Make sure the ID structure in the code match to your shopping feed ID structure.