How to track Google Ads Conversions with a JavaScript Application?


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
});

 


About the Author

Jacob Lett (Jake) is the founder of Bootstrap Creative, a B2B marketing consultancy in Clinton Township, Michigan. He helps industrial manufacturers generate qualified leads through HubSpot, technical SEO, and Google Ads. With over a decade of hands-on experience, he acts as a direct partner for B2B companies seeking measurable ROI from their marketing investment.



Related posts
Category: Common Questions

Tags:

| Read My Editorial Policy

Want to Get Email Updates of New Articles?

Join My Email Newsletter