VIDEO: How to Setup Google Optimize Using Google Tag Manager

Setup Google Optimize Using Google Tag Manager


I’m going to be running you through how to set up Google Optimize using Google Tag Manager today. So things you’ll need to get started are a Google Analytics  account, a Google Optimize account, and a Google Tag Manager account. You’ll notice that in the background here I’m within Google Optimize and this is what your landing page should look like when you log in. I really have my container set up here, but what you do when you log in for the first time is click create account, it will prompt you to give it a company name which is what you see in the background, and you can select any of these three; I suggest selecting all of them because there’s no downside to letting your data help Google improve their products, benchmarking, and in-depth analysis. At the bottom here you’ll just have to acknowledge their Terms of Service and hit accept. I’m going to skip that seeing as how I’ve already done it. So close out this window, and there’s that container that you have created so let me click into this.

Now I’m in Google Optimize I’m going to move this video over. You’ll see the steps to setting up your account on the right over here. The first part you would do is manage your account and use this to account. I can always add my container details which is essentially just the name of it right there, but that is where you manage just the details. The second step would be to link your Google Analytics account. This is where it comes in handy to have that set up, otherwise you’d be SOL at this stage. So make sure you have your Google Analytics account set up, you just click edit link and it’ll automatically pool all the analysts accounts you can link to. So I have my set up right there, I slide to my website data and hit save.  The next step would be to install the optimize snippet. This is where you’ll tie in Google Tag Manager and you also tie in a little bit of coding for your website. So I’ll click the third step and hit view snippet. When I do this it will give you the instructions to implement it in your regular coding but having Google Tag Manager will make this a lot easier. You’ll notice that it just tells you to append this code to Google tag that already exists. I’ll go into Google Tag Manager next and keep note that this number right here is my optimize ID.  When I’m in tag manager, I already have one set up but I would just go into tags and click new.  Name it Google optimize tag and configure, within here they make it very convenient because It’ll have a Google optimize option.

So if I click that, all it asks for is my Google Analytics tracking ID which I can grab right from my analytics account. So I’ll click here.  I mean admin a backup this will look more familiar, click property settings.  Copy and paste that tracking ID.  What I’d mentioned before it was the optimized container ID that’s what’s going to go in here so I’ll click back.  Grab that ID which is right here.  And drop that in there, we’re almost done send up that tag. All we have to do next is set up our triggering, I would want to trigger all pages and this would be good to go. I don’t have to click save because I’ve already implemented this tag, but here you’d click save and then just publish it like any of your other tags. Now after that set up I’ll go back in here. I don’t have to actually put this on my site now because that’s tag manager implementing it. The only thing you will need to implement is a second tag. You’ll notice they have this minimized page flickering. You want to copy this script and paste it into your head file right above where your Google Tag Manager is, because the Google Tag Manager is implementing the optimized code from the screen before and then this will implement the anti-flicker. So when it’s changing variations of your page, it won’t be flickering seeing one for a second and the other loading and I’ll show you where you put that.

So I’m a WordPress user, if you’re WordPress user this is very simple. You would come into your site files.  You would come down to appearance click editor. Then I want to find my header file, there it is header.php. So you see there is where I implemented Google Tag Manager and then I copy and pasted that anti flickering script right above it, and that’s all you need to do is put the scripts for the flickering and make sure it’s above your tag manager. Come down to the bottom and update this file and you’re good to go. You can log out of your CMS.

Now you’re done with Google Tag Manager so I can close that. You’re done with Google analytics so I can close that as well and now. All you have to do from here is create an experiment and start an experiment and to Google’s credit they’ve made this process very seamless and very easy to implement. So go ahead and create an experiment, call it test experiment.  And what website is this for? I’ll make it for my home page here.  Copy and paste that. So they have some documentation of what these different tests are, so if you’re not familiar with the difference between an A/B tests the multivariate test and a redirect check out the link in my description and that’ll give you an explanation. I don’t want to go too far in the weeds on that here but essentially an A/B. test is testing two different variants and multivariate tests can be multiple variations on a single page testing which is optimized the best and redirect test is testing two unique URL’s against each other. So if I cloned a page and created two completely separate pages and want to test which performs better, that’s where redirect test would come in handy.  But for now, I’m going to do an A/B test and click create.

So once I’m in here this is my original I can preview that. I want to create a new variant so click new variant.  We’ll call it test variant.  You can always add the variant information by coming into here, and then on the side you can also update all the experiment information. So I want test experiment, the editor page being this, might go on its properties Plush Republic and I want this triggering on all website data. So all this information looks good. Now I can go ahead if I want to make the adjustments to the test variant, I can click in on it, save and continue.  It brings me into this editing mode. Here’s my website and what’s really nice about the way to set this up is I can just add this inline. So if I want to add this element.  Add the text.  Change this to just say, “Marketing growth” instead of  “digital marketing and growth”, I can do that, click done and click save.  And that will be my new variation.

That’s all there is to it, I’ll make another video about the different types of variations. You can change the color, you can change buttons, you can change copy, essentially endless possibilities but now I can preview them and just make sure that that works. I’ll click web preview. This is my home page in the original state, so this is the first variation. This is the second variation and again this isn’t a great example as I said I want to change  copy and this is most certainly going to test is less effective. But it’s giving you a general gist of the kind of power that it has here. So I hop back in, I have my first variant which is my constant and then my test variant. So now I don’t have any set up in this environment but if you had objectives that you wanted to test you could do it from here and I could; actually do. I have macro conversion, so for me this is anyone who converts on a form ends up on my thank you page.

So I want to see in this experiment,  how many conversions do I get between the two variations. I’m changing the copy on the home page, this is a description for you or a hypothesis. Essentially notes for yourself to see how you perform and why you set this up. On the second page you get to select your targeting options, so the percentage of your overall visitors to target which I will typically do as 100%, and you can wait it more or less in favor of one variation. The very important part that you need to put here is, when this is going to load I only want this to be loading for 100% of the traffic visiting my home page. So you’ll notice that I have the URL off my home page here.  If this had been “if URL contains”, it could be on any page of my site that starts with this URL string. You want to make sure you have the correct matching criteria here, so your experiment runs when it should and then after all that I’m ready to go. I can save this and then by clicking start experiment, this experiment will be ready to go and I’ll get a full slate of analytics. Essentially I would like to run it for a minimum of two weeks and then after that point I can analyze it.

I’m going to be making a follow-up video as to how to analyze your experiments, and a bunch of different variations that you can create. Be on the lookout for those on my channel and I’ll add links to all the supporting materials in the description. If this is helpful please like and subscribe and share with your friends. Thank you.




Subscribe to Our Blog and Receive the Latest News in Digital Marketing

Leave a Reply

Your email address will not be published. Required fields are marked *