Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #1619028
gtag.js
Closed

Comments

  • pqinstitute started the conversation

    There is no place to enter Google Analytics code - gtag.js?

    Should it be placed in "Add Custom Code Inside <head> tag"?

    We can find a box called "Google Analytics Code" in "Footer options" / EXTRA but it is not for gtab.js (needs header)? Is it for analytics.js code?

  •  2,700
    PenciDesign replied

    Hi,

    Based on the guide from google, you can choose to paste it to Customize > Logo and Header Options > Add Custom Code inside <head> tag or Customize > Footer Options > Google Analytics Code. ( that' before close </body> tag )


    Best Regards,

    PenciDesign

  • pqinstitute replied

    1)

    "Google recommends putting it immediately inside of the head and not inside of any other html element. Why? It’s better for tracking all around. The higher up in the page the snippet is, the faster it is loaded. In the older version of Google Tag Manager, it was recommended to place the snippet in the body tag, but this would potentially miss tracking users who left your page before the body tag loaded.

    This has become even more important with the release of Google’s new A/B testing tool, Optimize. Whether you’re running a redirect test or and A/B experiment, having the snippet load faster ensures that Optimize will load the correct version of the page that your user is supposed to see, as soon as possible."

    2)
    "Can I put the GTM snippet in the footer section of my page?

    This is highly discouraged. For the same reason that we recommend putting Google Analytics in the head section, you want your GTM container to load as soon as possible, so your Analytics and marketing tags can load as soon as possible. This helps to ensure that you capture as many users as possible."

    So, You really should move "Google Analytics Code" box from FOOTER section to HEADER section. The code box is very useful because leaves the place in "Add Custom Code inside <head> tag" for any other code.

    3) There is no word about "Google Analytics Code" here:

    http://pennews.pencidesign.com/pennews-document/

  •  2,700
    PenciDesign replied

    Hi,

    If you want to put google analytics code to header. It's easy - because you can put google analytics code to Customize > Logo and Header Options > Add Custom Code inside <head> tag - It will working fine also.


    Best Regards,

    PenciDesign

  • pqinstitute replied

    OK. It is fixed! We used a plugin instead (higher position, better implementation).

    The last post was about that it would be better not to suggest FOOTER location because Google (especially in the new method, gtag.js) expressly requires a location in HEAD. However, PenNews implies the location of FOOTER (this suggests that the footer is better and recommended) and you do not write anything about it in the help file. It does not matter to us, but many new customers would help.