-
Madeau
Hello,
I am trying to install the analytics code for “Get Your Guide”, a travel experience agent.They are telling me to “Paste this code into the <head> of every page in order to visualise the widget and enable analytics data for it.” (and they provide the code).
Their instructions video is telling me to Go to Appearance – Theme file Editor, look for Theme file header, find the closing <head> tag and paste the analytics code before it.
However I get a warning that tweaking anything at all in there could mess things up, and to be honest I don’t particularly want to touch it because I am completely clueless.
So my questions are, what does “every page” mean, when they say paste the code on every page?
And most importantly, is there a way to do this safely?I do have common sense and I can follow instructions but please bear in mind I have zero knowledge of any of this. I appreciate your help and thank you in advance!
-
Hi there,
so the instructions they provided. DO NOT do that 🙂
Instead you can use a Hook to insert that code across your entire site.
To do that:1. Go to Appearance > GeneratePress and Activate the Elements module.
2. Go to Appearance > Elements -> Add New –> Hookhttps://docs.generatepress.com/article/hooks-element-overview/
2.1 in the Elements text area copy and paste script provided by the affiliate partner.
2.2 set the Hook towp_head
this lives inside the<head>
of the site.
2.3 set the Display Rules > Location toEntire Site
This will hook the script into the head of every page of your site.
- You must be logged in to reply to this topic.