Paste the Analytics Code into Your Website
OK, you’ve generated the code and copied it. Now… how to get it into your website. It has to go before the </head> tag on every page that you want to track. You could do it page by page by editing the html directly but that’s clearly impractical. Here are two easy methods:
If You Have the Thrive Suite
If you have the Thrive Suite, the Thrive dashboard makes it very simple.
Go to the dashboard and scroll to Analytics and Scripts.
Click the Manage Scripts button.
This will show any existing scripts and you can choose to add a new one.
Click the Add New button.
You can paste the Google Analytics script into the next screen.
Paste the copied script into the Script panel and click in the Script Label panel to bring up the automatic label Google Analytics.
Leave the Placement as Before </head> and tick both Inserted In check boxes.
Click the Continue button.
This will then show that the Analytics script has been added.
Click the Back to Dashboard button.
If You Don’t Have the Thrive Suite
You can also insert the Google Analytics script with the free Ad Inserter plugin.
Install it as you would any plugin.
Search for Ad Inserter, then click Install Now, followed by Activate.
Then go to Plugins >> Ad Inserter >> Settings
Click Settings to bring up the Ad Inserter Settings page.
Click the gear icon to get into General Settings.
This will allow us to insert code into the header of all pages, i.e., between the <head> and </head> tags, which is where the Google Analytics code needs to go.
Click on the Header tab, then enable header code by clicking on the middle of the three small buttons (the one next to the php button) and finally paste the copied Google Analytics code into the panel.
Click the Save Settings button.
A little question to you, the older version of GA has stopped working for me somehow,so I can just delete it now, right?
That will not put GA4 in any danger or my website tracking?
I still need to figure out the details though, of the new version, I don't really like it all this far. It is hard to see the traffic coming exactly from each social media channel, etc. I dislike the change haha! So I'm not sure, I just might hold on to it a bit longer and try to put my tracking code for the original one back on my website, or is that too much and impossible?
A little bit confused here, thanks!
You saved the day for me and so many others, I'm sure.
I had already converted all my properties to the GA4 property tags, but was not sure how to get the new coding to be inserted into the Header Section.
I did this a few years back, but could not remember all the details. And as you pointed out, Google has made a lot of changes on their analytics instructions.
Without your concise training, I would have never been able to get this done in a timely manner.
Thanks Phil!
Eric aka RVsRock
Out of curiosity, In order to convert over to the new A4, would you have to go through this from scratch or is there a simpler way?
Great job!
Susan
Thanks though for explaining this to the people who are confused;-)