Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Adding Google Analytics code to landing pages

New Here ,
Jul 09, 2020 Jul 09, 2020

Hello,

 

I was wondering if you guys could help me out, please.

I was asked to add Google Analytics tracking code to some of the company landing pages.

The issue here is I don't have access to the top of the page (Header). I was provided with a  locked template for header and footer created in php and I can only amend what's in the body.

could you please advise?

 

Many thanks,

Anna

TOPICS
Other
240
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 09, 2020 Jul 09, 2020

Although Google advises to place the code as high as possible in the document, I always place it as low as possible. This is because it stops rendering the page while it connects to the Google server.

 

So, to answer your question, you can place it anywhere,

 

Edit: To be honest, I have stopped including the tracker in my documents, the only one that benefits ($$$) is Google. Most decent hosts have their own tools to do the same.

Wappler, the only real Dreamweaver alternative.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 09, 2020 Jul 09, 2020

When you say landing pages, are these pages hosted within your site or pages hosted through a marketing solution like Marketo?  If the latter, you typically don't edit the code often because either: 1. it's already included elsewhere via your application, or 2. the admins are needed to add it for you.  Personally speaking if you need to add stuff I would work with your tech team to either add the code for you or look to use a tag manager like Google Tag Manager or Adobe Tag Manager so that you can include tracking or optimizing scripts without needing access to edit other parts of the source code.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 09, 2020 Jul 09, 2020
LATEST

Ask whoever is in charge of the Template to do this.  The site verificiation meta tag goes inside the <head>.   Tracking code <script> goes above the closing </body> tag. 

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines