Install Google Optimize on Your Website

Image
This step is essential, but the way you do it depends on how you currently have your Google Analytics tracking set up. I will introduce two common approaches respectively. You can choose either one of them although I encourage you to try. 1. Install Optimize with optimize.js If you have manually entered your Google Analytics tracking code into your header (or another part of your site), which is exactly the same as discussed at section 2.1 of my another article, Install Google Analytics on your Website , all you need to do is copy and paste a new line of code into it as instructed:  1. Go to the container page of your Optimize account.   2. Add the following code to the top of the “<head>” tag on ALL the blog page you wish to optimize and click save button. 3. For more details about how to Install Optimize with optimize.js, refer to https://support.google.com/optimize/answer/9692472?hl=en&ref_topic=6197443.  2. Install Optimize with Google Tag Manager (GT...

Install Google Tag Manager on Your Website

This approach is preferred if you want to apply more complex and customized tracking or you are new to use Optimize. I also recommend you to try this approach.

1. Set up Google Tag Manager

  • If you don’t have a Google Tag Manager account:

        a) Go to https://marketingplatform.google.com/about/tag-manager/. 

        b) Click on Start for Free.

        c) Add your company’s name and country.

        d) Set up the container’s name as your website’s name, select “Web” and click on Create.

        e) Review the Terms of Service and click Yes.

        f) You will be prompted with the web container installation code snippet

  • If you do have a Google Tag Manager account:

        a) Go to https://marketingplatform.google.com/about/tag-manager/. 

        b) Click on Sign In to Tag Manager.

        c) Find your account in the list, click on the dot menu and select Create Container.

        d) Set up the container’s name as your website’s name, select “Web” and click on Create.

        e) Review the Terms of Service and click Yes.

        f) You will be prompted with the web container installation code snippet

        g) For more details about setting up and installing Tag Manager, refer to https://support.google.com/tagmanager/answer/6103696?hl=en&ref_topic=3441530. 

  • Install the GTM code snippet:

        a) Go to your account of GTM and click your container name.

        b) On the top right, click on your container ID, formatted GTM-XXXXXXX. The GTM container installation code will pop up.
        c) You will have to copy and paste the GTM container installation code on every page. 
Note 1: This is the piece of code you’ll be pasting into your website’s back end in order to manage your tags. The placement of the container on the page is very important: the first part of the code has to be placed in <head>, as high as possible, the second part of the code has to be placed immediately after <body>.

        d) Important: when you try to save the edited HTML after you add the first snippet of code into your blog template, it will show the following error:
Solution: in this case, you need to replace line “j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=”in the code of first code snippet with “j=d.createElement(s),dl=l!=’dataLayer’?’&amp;l=’+l:”;j.async=true;j.src=”. Now, you can successfully save it.








Comments

Popular posts from this blog

A/B Test with Google Optimize

Install Google Optimize on Your Website