How to track Google Ads Conversions with a JavaScript Application?

Download FREE Marketing Guides
How to track Google Ads Conversions with a JavaScript Application?

I recently ran into an issue tracking Google Ads conversions with imported Google Analytics Goals. I was using a destination goal for a thank you page. This was setup properly but the website was using JavaScript to change the url destination and so did not refresh the page. This prevented the goal from running even though the user was hitting the destination url.

The solution was to fire this event each time your route changes in your JS app. Then create Google Analytics goals based off these events.

gtag('event', 'pageview', {
    'event_category': 'js app',
    'event_label': window.location.pathname
});

 


Written by: Jake Lett
I share digital marketing tips and HubSpot tutorials to help marketers and business owners grow their business.


Related posts

Tags:

Want to Get Email Updates of New Articles?

Join My Email Newsletter