x

Installing both Google Analytics and Google Ads on One Page

Hi,


I have a Google Analytics global site tag in place in 'Settings' > 'SEO' > 'Header Code'. 

Additionally, I have a Google Ads tracking code that I would like to install only on the 'Thank You' page after a user has submitted a form. The tracking code snippet generated from Google Ads is similar to the GA's global site tag except that the gtag config ID is different.

My question is am I right to place the Google Ads tracking code in the 'Thank You' page's 'Header Type' > 'SEO settings' under 'Header Code'? Should I also include the Google Analytics gtag config ID as well in the page? Or is that taken care of since it has been in place in the general SEO Header Code section? 


For example, should I have the code (below) in the 'Thank You' page's SEO setting.

<script async src="https://www.googletagmanager.com/gtag/js?id=GA-TRACKING_ID">
</script>
<script>
  window
.dataLayer = window.dataLayer || [];
 
function gtag(){dataLayer.push(arguments);}
  gtag
('js', new Date());

  gtag
('config', 'GA-TRACKING_ID');
 
gtag('config', 'AW-CONVERSION_ID');
</script>

Or

Like this:

<script async src="https://www.googletagmanager.com/gtag/js?id=GA-TRACKING_ID">
</script>
<script>
  window
.dataLayer = window.dataLayer || [];
 
function gtag(){dataLayer.push(arguments);}
  gtag
('js', new Date());

 
gtag('config', 'AW-CONVERSION_ID');
</script>

 Appreciate any feedback and advice on this.

Thank you!

1,714 Views
Message 1 of 2
Report
1 Best Answer
Square

Best Answer

Hi @AlexChan yes, you will want to use the analytics code in Settings>Header and the ads code on the individual page. In fact, I believe you can use the Embed Code element to drag/drop the ad where you want it to show. 

View Best Answer >

1,701 Views
Message 2 of 2
Report
1 REPLY 1
Square

Best Answer

Hi @AlexChan yes, you will want to use the analytics code in Settings>Header and the ads code on the individual page. In fact, I believe you can use the Embed Code element to drag/drop the ad where you want it to show. 

1,702 Views
Message 2 of 2
Report
This thread has been archived and locked. Please start a new thread if you would like to continue the conversation.