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

Adding Google Analytics code to landing pages

New Here ,
Jul 09, 2020 Jul 09, 2020

Copy link to clipboard

Copied

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

Views

200

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

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