Add this to your child theme function.php at the end, and insert the proper tag. ``
<?php
function ds_checkout_analytics( $order_id ) {
$order = new WC_Order( $order_id );
$currency = $order->get_order_currency();
$total = $order->get_total();
$date = $order->order_date;
?>
<!-- Paste Tracking Code Under Here -->
<!-- End Tracking Code -->
<?php
}
add_action( 'woocommerce_thankyou', 'ds_checkout_analytics' );
``
Answer from jrubix on Stack OverflowVideos
Does anyone know where to connect and paste the Google Ads Event Snippet -code?
Now that the Shopify Checkout settings Additional Scripts -portion of Shopify has disappeared and depricated, I want to install the Event Snippet code using the Google Tag method, and not with Tag Manager or by installing the Google App.
All the instructions and blogs about the subject try to use Tag Manager, instead of Google Tag. Or they change and alter the Event Snippet -script into Enchanted Tracking code. I only want to use the original code that you can copy directly from Google Ads.
Does anyone know a simple way to just to add the original Event Snippet checkout page code from Google Ads with google tag into Shopify in 2024. Custom Pixel? Theme.liquid ?
I'm talking about this Event Snippet code:
<!-- Event snippet for Purchase - STORE NAME conversion page -->
<script>
gtag('event', 'conversion', {
'send_to': 'AW-XXXXXXXXX/xxxxxxxxxxxxxxxxxxx',
'value': {{ checkout.total_price | money_without_currency }},
'currency': 'USD',
'transaction_id': '{{ order.order_number }}'
});
</script>
Hello guys!
When we do conversion tracking for any google ads campaign- where do we have to add the event tag? Do we have to paste it in the head of the page where the event will take place. Or can we place it anywhere on the body?
eg- if we have to track page view of a page- do i have to place page view event tag in the head of that page?
Hello,
I am trying to track 2 very simple conversions on one webpage with Ad Words. I setup both conversions in Ad Words, added the right ID and label to the GTM tag, and setup a basic "just links" trigger for each tag. However there are no conversions showing on the AdWords side. I reached out to Google and they said the global GTM is setup across the website but we need to add an 'event snippet' to the particular page where the conversions take place.
How do I do this with GTM? Novice GTM user here...
Has anyone had luck with adding google ads event snippets to Godaddy website builder? All of the articles I’ve seen lead me no where. We’re a startup so Godaddy was the easiest option in the beginning.
has anyone found a work around to be able to track conversions from a Google ad with a godaddy website? Do I need to add the event snippet for it to work?
Haven't used Squarespace for retail before and suggested best practice is to use their code injection interface to add the conversion event snippet to a dedicated section that fires it at the end of their checkout process (and pulls in the basket value). The Google Tag associated with the Google Ads account is fired (on all pages) via GTM.
This should work as intended, right?
If this post doesn't follow the rules report it to the mods. Have more questions? Join our community Discord!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
Are you a marketing professional and have 15 minutes to share your insights? Take our 2023 State of Marketing Survey.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.