How much traffic did your website get yesterday? #GoogleAnalyticsQ&A

Google Analytics can become overwhelming really fast if you don’t know what you are looking for. That’s why we always want to start with a question in mind. So today, I’m starting this series to answer some common questions and how you can solve them with the help of Google Analytics.

Today’s question: How much traffic did you get on your website yesterday? We will use Google Analytics to get an in-depth understanding of how to obtain the data to answer this question.

🔗 Links:

Get Access to the Google Demo Account: https://support.google.com/analytics/answer/6367342?hl=en

🎓 Learn more from Measureschool: https://measureschool.com/products

🔀 GTM Copy Paste https://chrome.google.com/webstore/detail/gtm-copy-paste/mhhidgiahbopjapanmbflpkcecpciffa

🚀Looking to kick-start your data journey? Hire us: https://measureschool.com/services/

📚 Recommended Measure Books: https://kit.com/Measureschool/recommended-measure-books

📷 Gear we used to produce this video: https://kit.com/Measureschool/measureschool-youtube-gear

👍 FOLLOW US
Facebook: http://www.facebook.com/measureschool
Twitter: http://www.twitter.com/measureschool
LinkedIn: https://www.linkedin.com/company/measureschool

How much traffic did you get on the website yesterday? The topic of this video is going to be how we can find this out in Google Analytics. All the more coming up.

Hey there measure geeks. Julian here back with another video. I’m actually starting a new series here where we’re going to answer some common questions with the help of Google Analytics. Now, a question is always very important because when we start our analysis process, we want to start out strong with a question in mind. So we actually get a result from our analysis. If you don’t have a question and just look through the reports within Google Analytics, you find yourself very confused, very overwhelmed with all that data without having a real result. So we’ll start out with a question. And the first question we want to tackle is how much traffic did I get on the website yesterday? This might be a question that your boss asked you, a client asked you or yourself as yourself. So let’s open up Google Analytics and find out what we can do about this question and where we can find the answer.

All right to get started, I would recommend that you open up your Google Analytics account. Or you can also get access to the same account that I have access too here. It’s the Google merchandise demo store, which you can get access through this link on the help section of Google Analytics. I will link this up down below as well. And then we are entering Google Analytics through the home screen. And on the home screen, we already get some data and some answers to our questions which is, what traffic did we get yesterday. So we have this big overview already here. And if you hover over this chart, we see that this line chart shows us the different dates. And yesterday was Monday, June 3, and we can see here that the users were 2330. So really quick answer to our question already. And on this home screen, there are a lot of questions that are answered here. So we have right here, how do you acquire users, we get a breakdown right here, or how are active users trending over time. Now, these are great shortcuts. But if you want to look at data more in depth and especially data about the traffic, then we might want to look at the audience report. So we’ll go over here to the report section. And actually click on overview for the audience section. We get a nice line chart right here. And some more overview data. Let’s talk through this first of all. Again, we are seeing here, our different users trending over time, and the familiar number 2030 from 2330 from yesterday.

Now, if you want to narrow down our focus here and only want to focus on the day yesterday, we can go up to the calendar section at any time and choose a custom date range. So yesterday was the 10th, we can click on the here or on the top here there are Quick Select menus for today or yesterday. So let’s go on that apply this and it will zoom in. And this chart will change to show us the hours of when we got these users. So we’re looking here at the user metric. And this really brings us to our first distinction that we want to make when we look at the traffic that we got yesterday. Because traffic doesn’t equal traffic, there is no one definition for traffic. The way Google Analytics works is that there’s a tracking code installed on your website. And each time the user goes from page to page data is sent over to Google Analytics. This data is commonly referred to as page views. So each page that is open on your website generates a page view. This will obviously differ from websites that are more prone to generate a lot of pages views than a very short informational site where the user gets the information on, for example, just one page. So it may not be what you’re looking for. But Google Analytics actually gives you different models of looking at the data. The second model that we can look at are the sessions.

Now, Sessions is a grouping of different page views together in a timeframe. This time frame by default is 25 minutes. So let’s say a user comes to your website, looks at a couple of pages, then leaves the website and in the evening, reenters your website and looks at a couple of more pages. Then you will have counted two sessions and a couple of page views each time. And that’s why it’s logical that the page views are far higher than the sessions as they’re grouped together within that metric. Now above that all we have the user metric. The user metric is calculated by looking at the cookies or the user ID of the user was entered the website. And if it’s still the same from his first visit then this will be grouped as one user. So you could imagine that the one user that we just talked about has two sessions and a couple of page views. But it’s just one user. Now, these different metrics are actually called scopes as well in Google Analytics, as we can attach different data to them. So a page view can carry metric, like how long the user was on that particular page itself, we can look at the sessions, and that relation can look at the bounce rate. And when we look at users we can determine is as a new user or an old user. So it’s always important to look at your data through the right lens. And traffic isn’t the same as maybe some other traffic.

Depending on who you’re reporting to or the comparability later on. You might want to choose one or the other as your KPI for further reporting. Now that we have seen here that we had 2330 users, how is this actually meaningful to us? Well, the first thing when we talk about traffic is that there is a time component instead of our question yesterday. Yesterday was a Monday so I’d like to know know if there’s numbers high or low. Let’s compare it to the previous Monday. Now, I can click here on compared to, and if I choose previous period, it actually takes the day before which was Sunday. So we could gauge if the traffic went up or down during these days on the Monday it actually increased. But let’s do for better comparison, a comparison to the actual Monday, the week before. Let’s apply this. And we can see we had a slight increase of the overall metrics right here. But this could obviously be more significant if you had a sale running or more people coming to your websites for a marketing campaign. Now let’s look at this data. Actually, not the week before, but let’s put it in one year before. So take this metric here and put this in for 2018.

Apply this. And here we go. We see a more significant increase in traffic as opposed to our last year’s performance. Now there’s tons more question that I could ask here about my data set and dig deeper from the traffic that we got yesterday. For example, where did the traffic come from, how did it convert, and that the users actually reached a goal that I set out for them to reach? But these are questions for our next videos. And I hope you are now able to answer the question, how much traffic did I have yesterday? And know how you can compare and actually gauge the differences between the different metrics that you have available for answering your questions. All right, so there you have it. This is how you can see how much traffic that you get on the website yesterday. Now you might find my question a bit more nuanced than what you have thought. But I had these many visits or sessions or users. So it gets really complicated very fast. And Google Analytics, it needs to be complicated because it’s a complex world out there. It is not one answer that you can give with your data in Google Analytics. I hope you understood this and took this away from this little tutorial. Now, you might also have noticed that you have tons more questions, I would encourage you to dig through some more reports in Google Analytics and find out the answers to your questions. We have tons more questions that will come up on this series. So definitely subscribe to the channel right over there. Or check out our other videos right over there because there are new ones coming out all the time. Now, my name is Julian, see you in the next one.

SHOW MORE...

How to track CRM Offline Conversions in Google Analytics (Part 2)

Triggering an Offline Conversion in Google Analytics can be accomplished with a bit of custom Tracking and the help of the Measurement Protocol, as we already discovered in our first video. In the second part of this series, let’s go through the step by step procedures on how to create a tag in Active Campaign so it can send the offline transaction to Google Analytics.

Part 1 of Offline Conversion tracking: https://youtu.be/H6ktBdCxm7w

🔗 Links:

GTM Container Download: https://measureschool.com/wp-content/uploads/2019/07/offlineEcommTracking-1.json

Google AppsScript + Sheet: https://docs.google.com/spreadsheets/d/1oKNZhJ6SjJZVmyA4oh5q_XcYZ_FNC8YWNqY2Y7tSc8g/copy

Webhook Tester site: http://webhook.site

ClientId Variable by Simo Ahava: https://www.simoahava.com/analytics/improve-data-collection-with-four-custom-dimensions/#2-client-id

FormFill Video: https://www.youtube.com/watch?v=z20G9NqphYY

🎓 Learn more from Measureschool: https://measureschool.com/products

🔀 GTM Copy Paste https://chrome.google.com/webstore/detail/gtm-copy-paste/mhhidgiahbopjapanmbflpkcecpciffa

🚀Looking to kick-start your data journey? Hire us: https://measureschool.com/services/

📚 Recommended Measure Books: https://kit.com/Measureschool/recommended-measure-books

📷 Gear we used to produce this video: https://kit.com/Measureschool/measureschool-youtube-gear

👍 FOLLOW US
Facebook: http://www.facebook.com/measureschool
Twitter: http://www.twitter.com/measureschool
LinkedIn: https://www.linkedin.com/company/measureschool

 

In this video, I’m going to take you step by step through the setup process of our Active Campaign add a tag to trigger a transaction in Google Analytics that we have discussed in the last video. So if you haven’t checked that out yet, then definitely hit that button up there or up there, that will take you to that video. We’ve got a lots to cover. So let’s dive in. Now that I cleared out all the different tracking that I had installed before, let’s go ahead and build this from scratch step by step. First of all, we will need to integrate our form that transfers the information to Active Campaign. So an Active Campaign will go over to forms here. And then under view form, you can edit your existing form or create a new one. I will just create a new one and give this a name, choose the online form as we want to post it on to our website. And once the user is subscribed, we will put them on to the contact list.

So let’s create this form. And we will enter the form builder. Now, inside the formula we already have two fields here; full name, email. Let’s add the phone number and a special field that we’re going to hide later on. And this is going to be our client ID field. So we go here to add a custom field. And this will be our text input field. And just call this client ID. Let’s add this. And here now under my fields, we have our client ID. So I’m going to add this here as well. Now, you can change around the message here as you might want to customize this. But I’m just going to leave this for now and click on the integrate button which will give me our HTML code right here. So I’m going to copy this, go back to my website. And I’m going to edit this page in order for us to integrate this form. In the text fields, going to add my code here and update this. And as I mentioned, you could also do this with a third party form software that integrates with Active Campaign. And here we have now all our fields.

Now, you might see that client ID it not yet hidden. This is something we’re going to do later on. For now I want to set up the tracking that would fill in the client ID into this field. Now, where do we get the client ID from. The client ID is actually something that is automatically created by our pageview tag. So if we have Google Tag mentioned installed which I have on this website as well, we have already a GA page view tracking installed. And if I reload the page, we get our preview mode. And in that preview mode, we have our GA pageview tag already deployed. This gives us a client ID. This is normally stored inside of our cookies. So here we see the client ID that we would like to transfer over. We can actually get the client ID directly through JavaScript with a custom JavaScript variable. So let’s set that up. Go over to Google Tag Manager and click on variables and create a new user defined variable. This will be our custom JavaScript variable for client ID. And as a configuration which was custom JavaScript, and enter here a little bit of JavaScript that I have already prepared. Now this JavaScript will actually go through and look at all the trackers. Look for our tracking ID which we need to define. So let’s head over to Google Analytics account and go to tracking information tracking code here. Here we go and enter this into Google Tag Manager as well. By the way, this code is by Simo Ahava. So if you want to find out more about how this actually works, you can head over to his blog. I’m gonna link it up down below as well.

Now that we have that setup, let’s try this out. Let’s save this and look into our form, we refresh and reload here. Our preview and debug mode shows us that the client ID is now stored in this variable. So pull it out correctly, we just need to fill it in into this field. Now in order to do this, we would need to deploy a custom HTML tag. So we go over and click on new here in the tag section and choose a custom HTML tag. Give this all a name, I’ll call this contact us client ID form field. And again here, I have some pre existing code that takes in your CSS selector class. And whatever you want to fill in the field. This is actually a code that I’ve written for another video. If you want to check that out, I’m also going to link it up down below. It’s about filling a form field with Google Tag Manager. But in our special case, we want to actually get this hidden form field or this client ID field which is not yet hidden. So we would need to know the CSS selector, how can we find that out?

Let’s go inspect here. And he has the field. And there are different ways of selecting this specific field. You could try to copy the CSS selector directly. But what I like to do is to actually try this out instead of the developer tools. So I’m gonna make this a little bit bigger, press the Escape key, this will open up our console. And here I can type the word document dot query selector. And in parentheses, try out my CSS selector and see if it returns anything. But the most unique thing about this selector for me is this name field which is field for. No other input field would have this name field. So we can try this out by putting first of all our input field in here. And then in these square brackets, I’ll put a name equals single quotes this time field and four. So here we go, we should have and I press enter our exact field selected. So this is the CSS selector, I would like to use, just going to copy it and put it back into my Google Tag Manager right here.

Now, the next part would be to actually fill this input filled with a special value. Where do we get value from where we want to fill in with the client ID? And that’s what we’re going to pull from a variable if you’re already prepared. We just need to write these two curly brackets and then this menu will pop up. Now, we just need to define when do we actually want to fill this form filled? Well, I want to fill it on the, on this page here Active Campaign form. And I want to fill it when our form has loaded. This is very important because we don’t want to fill the form when it’s not yet loaded, as this within fail the script. So the most secure way of doing this is to fire it pretty late. In our case of would be to DOM ready which will tell us that the page has loaded correctly. So let’s go over to tag manager and build a new tag based on this event of DOM ready. This will be our AC form on DOM ready. And as conditions, I want to check, first of all, if the page path contains our Active Campaign form. And I also would like to know if the client ID is not does not equal undefined. So if the client ID was not able to be defined, then I don’t want to fill the field either. Let’s save this, save our tag, and refresh. And try this out again. Reload. And we see here, our client ID was now filled by our client ID form field tag. So this is the exact client ID that we would need to identify the user. And this is actually identified as Google Analytics uses as well.

Now, you might see that this is still visible. So let’s take care of that. We will go into our HTML of our form and actually look for exactly that form field. So let’s scroll down here. And as we have seen, that was this field right here, the client ID field. Now we don’t actually need the label anymore because this will just on the front end. But the input field needs to stay. And instead of the type text will now choose simply hidden. This will turn this into a hidden form field. And let’s update this, go back to our page. Here we go. And our field is now not visible anymore. But we can still see it in the HTML. So if you go on to inspect element, and just hover over here to see, that could be one of the last ones of these elements right here. Here we go. We have our field number four, it was already filled with the client ID, and it’s not visible. But if you want to see it in action again, you can just change this value over to text. And you see here is the form field. But in our case, it should be hidden by default. Now that we have this in place, let’s go ahead and do a test if it is received by Active Campaign. So we have that information filled out. Let’s submit this, be signed up, we should see our contact now in the contact records. Here we go. This is the user with its client ID. So now we have all the information we would need to do this Google Analytics and transaction hit in our Active Campaign. We just need to have a way to actually transfer it onto Google Analytics. And this is where automations come in. We want to trigger automation when somebody adds a new tag.

So let’s go ahead and add a new automation will create a new automation from scratch. And we want to trigger this when a user adds a tag. This tag is freely definable, in our case, it was offline conversion. So let’s stick with that. And you can choose if the user can only run once or create one conversion, or multiple times. I’ll go with multiple times here. Let’s put this into the start. And now we need to define the action that we want to take within automation. Now, we don’t want to send an email. We actually want to simply post this to a web hook. So post contact data to a URL of your choice. We choose this and we need to enter the URL. For now I would say we’ll just go with the testing site which is web hook dot site that you can go to. And we’ll give you a web hook URL that you can test. So we’ll just copy this to clipboard and put this into this field. Let’s save this. And at the end, once the user has gone through this step, I want to end this automation. So he’s not stuck inside of the automation itself, we need to give our automation a name. Let’s go with offline conversion here as well and save this. Now, we need to turn this all active and try it out by going into our contact record. Let’s add our offline conversion tag. It is added. Now this contact should be added to our automation, let’s reload this contact. And you can see he entered your automation and he completed it already.

When we click on the automation itself and view how the user went through it. We can see this was posted to the web hook itself. And then he ended. So we should have new data on our web hook site here. Yes, it seems like all this contact data was sent over to the web hook. So on the automation side, on Active Campaign side, everything is working already correctly. Now, we need to send this data into Google Analytics. This is where our App Script comes in. Now, an app script it’s actually something that is connected to a Google Sheet. I will give you the link in the description below. You can just make a copy into your Google Drive account. And once you have that open and copy to your Drive account, you need to do some configuration. So the first thing you need to do is go over to tools and to the script editor and click on the publish button right here and deploy as web app. Now this will give us a our web URL which we will then put into Active Campaign. Okay, once the window opens, we can click here on execute the app as me and who has access to the app. Well, anyone even anonymous users will update. And we need to review some permissions. Now here, you need to utilize your Google account. And it will tell you that it will see an edit your spreadsheets which is exactly that spreadsheet just here. And we also need to confirm that we will connect to an external service in our case, that is Google Analytics. Let’s allowed us. And back in our app, we should now get our web app URL which we will utilize in Active Campaign. So copy that can close this now and put this into our automation, right here. So instead of the website, we will now post this to our Google app script.

Let’s save this. And before we do a test, let’s look at our sheet that we have created. In our sheet will see a log file. So every hit that was sent over is here with all the configurations. But since Active Campaign just provides the client ID, we actually need to define a few things that we want to have our hit that we sent over to Google Analytics filled by. So first of all, you will need to fill out the tracking ID right here, I’ve already done this. But if it’s not filled out, your hit will definitely fail. You can leave the version untouch. The client ID will be filled by web hooks. So don’t change this around. We’ll send over an event a transaction and as a category offline as an action. And then and as event label our client ID. Now you can change this around, you can customize this. But just be aware that this is already pre configured to work. And if you change anything, you might need to readjust it.

This is set as a non interaction hit as true. And then as a transaction ID, I have actually just taken a formula here to come up with a random ID that we would later be able to recognize with O and then the number. So offline and then a number that is simply random. Then we come to our ecommerce hit. So ecommerce hit has affiliation which is not filled out. Every field that is not filled out for just simply be dropped. We can put in our revenue. So if our conversion is worth $100, we put that in. The tax, the shipping information, I just put this to zero, the transaction coupon if there was any. And you can also put in product information. So purchase a product, product ID, the quantity, the price and the category if you choose so. You could even put in multiple products. And for that, I will just encourage you to copy here, the second product, you could put a third product, fourth product and so on in. Now, this information will be used to then construct the hit an ecommerce transaction that is sent to Google Analytics. So if you done anything wrong here, it might not work. So be aware of the fields or in the end, you might need to debug or circle back to the old version here which is already filled out correctly.

All right, now that we have that setup we already done, we can now go ahead and test this whole implementation by going back to our contact record. And just getting rid of this tag again and adding it back and then head over to Google Analytics where the data should be received. Let’s go into the events. And here we go. We have a new event, we don’t see anything here because it’s a non interaction hit. So under events last 30 minutes, we now see our transaction offline with the right client ID that we also hopefully have inside of our contact record. Yes. And this has now produced a conversion. And later on, we will be able to then look this up in our user explorer report if you’re interested in where the user came from. Or inside of our conversion reports here under ecommerce, we would also see this in the sales performance as an offline transaction that happened. Now to spend us all to the end, we haven’t yet actually submitted a version. So we’ll put this live on to our website that fills it out our hidden form field. So I’m going to add this in, publish this, and it goes live to our website. So this is how you can automatically create an offline conversion by editing attack inside of Active Campaign.

All right, so we have gone through the tutorial on how to set this up. And I hope you like this tracking technique. It definitely helped me out to track more my conversions more closely. I’d love to hear from you if you utilize this functionality. And if you have any problems to set this up. Let me know in the comments down below. And obviously, we could also with some customizations make this more dynamic or support this over to other CRM systems. So if you are interested in that, let me also know in the comments down below and maybe I could rewrite the script for other platforms. Now, if you haven’t yet, then hit that subscribe button over there to stay up to date with everything that we do here on this channel. And my name is Julian. See in the next one.

SHOW MORE...

How to track CRM Offline Conversions in Google Analytics (Part 1)

Google Analytics Offline Conversion tracking is possible via the Measurement Protocol. Connecting your CRM system is not trivial as you will need to send a special transaction Hit to Google Analytics server-side. In this video, I’m going to introduce to you a a tracking technique which takes advantage of Google Tag Manager, Active Campaign and Google Apps Script to accomplish sending an Offline Transaction to Google Analytics.

🔗 Links:

Google Analytics – https://analytics.google.com/analytics/web/

Active Campaign – https://mbsy.co/activecampaign/21040300

🎓 Learn more from Measureschool: https://measureschool.com/products

🔀 GTM Copy Paste https://chrome.google.com/webstore/detail/gtm-copy-paste/mhhidgiahbopjapanmbflpkcecpciffa

🚀Looking to kick-start your data journey? Hire us: https://measureschool.com/services/

📚 Recommended Measure Books: https://kit.com/Measureschool/recommended-measure-books

📷 Gear we used to produce this video: https://kit.com/Measureschool/measureschool-youtube-gear

👍 FOLLOW US
Facebook: http://www.facebook.com/measureschool
Twitter: http://www.twitter.com/measureschool
LinkedIn: https://www.linkedin.com/company/measureschool

Oh boy,

I’m excited about this one. In this video, I’m going to show you a tool to simply add a tag to an Active Campaign contact. So a CRM system and then trigger an offline conversion within Google Analytics. All and more, coming up.

Hey there measuregeeks, Julian here. Back with another video. Today, I want to show you a little tracking technique, little app script that I’ve written in order for us to be able to trigger an offline conversion within Google Analytics with our CRM system, in this case, Active Campaign. So where would this be useful, you might know that not all transactions actually happen on the website itself. And that’s why Google Analytics never would know about these transactions. So your data set is sometimes incomplete. For example, if you have a quote form on your website and the user gives you their phone number, and you call them back and tell them about your product, and they decide to buy. How Google Analytics actually know about the sale? You might have the information within your CRM system like I have in Active Campaign. But there is no connection between Google Analytics and the CRM systems. So I come up with a workaround.

And today, I want to show you how you can simply add a tag to your Active Campaign contact. And then this will trigger an offline conversion within Google Analytics to be able to look up the contact actually within Google Analytics and see where he originally came from. This could be useful for phone conversions, but also webinar conversions or complex sales funnels, where the user doesn’t convert on the first visit. Now, we got lots to cover. So I’ve actually broken this video up in two parts. In this first part, I’m going to show you how you can utilize this tracking technique. Then we’ll go through the different components that I play. And then the second part of this video, I’m going to show you how you can set this up step by step for your own website with Active Campaign. So you see we got lots to cover. So let’s dive in.

All right, before we dive in, I quickly wanted to run through the use case of what is tracking deployment will look like at the end. So here I am on our demo shop, we have installed an Active Campaign form. This is taken directly from Active Campaign. But you could also install this through another third party form software where you integrate Active Campaign. Now this form, ask us for the full name, email address, and phone number. Really, you could imagine that this is a quote form or any kind of process where you would close the customer offline, you would call them back or visit them at home or have a personal conversation with them, and not an online process like a checkout. So we’ll fill out our details here. And submit this. And this will create a new contact record within Active Campaign. So let’s head over to Active Campaign.

Here we are in our contact records, reload this, and here we go, we have our contact record. Now we have asked the user for his or her phone number. So we call this us back and convince him to close the deal with us or buy our product. Now, this could be minutes afterwards, or days or months afterwards. In the end, what we would need to do is just add a tag called offline conversion. And then we should see inside of our analytics. Let’s go into the real time reporting. here under events. There you see there’s a new event that just fired. What is this event? it’s a offline transaction that just fired. Now, with this offline transaction, we are actually sending on the user or the client ID that Google Analytics gave this user when he first visited the website. Now with this client ID, we would be able to go into our user explorer report which is under audience and user explorer here, go to the right date, which is today and search for this number. So here we go. We have one session by this user. Unfortunately, it takes some time to populate. But we should see in a second that there’s also a transaction that happened because we actually sent over a transaction hit. So let’s wait here for a second.

And here we go. When we reload the page, we can see now that this was updated and we have our purchase now tracked within Google Analytics. This would obviously also then show up in the enhanced e-commerce tracking. So if you go over to conversions here, under ecommerce and then our sales performance, we should see a new conversion in our sales tracking. So how did this go down? Let’s break it down bit by bit. First of all, our form right here. Now, this form is actually special because it has a hidden form field attached to it. So if you go here under Inspect Element and we look for the next form field here, we can see there’s a hidden form field that transfers a number over and this number is the client ID. Now, this client ID is actually something that Google Analytics generates, and we just fill it into this hidden form field. So it will be sent once the user clicks on the submit button. How do I do this?

Well, with my favorite tool, Google Tag Manager, we have a tag here that grabs the client ID and then fills it into our form. I’m going to show you in a second how this actually works. Once we send this contact off, it will be filled automatically into our contact record within Active Campaign. So here we have the client ID. Once the right tag is set, we actually built a little bit of automation right here, I can show you this. Let’s go into view. This will just listen for the tag offline conversion. Once this is added, it will create a webhook request. It will post the contact information to a webhook URL. Now, this URL is a little bit of Google Apps Script. And it’s all based on this sheet here where we can see also which hits have already been sent. We can configure our hit. So this is in no way dynamic.

But if you have just one type of transaction that could happen, then you can fill this out however you want with your revenue that you will generate, your product that you have sold. And if you would like to add any products, you can do this too. And this will construct the hit. And once a new webhook is detected, we have a little bit of an App Script right here that searches for the client ID field and the contact record. Pulls that out and match it together with this information. And then sends this of true Google Analytics as an event with transaction data touch and that’s how these reports then get filled. So if you’re interested in rebuilding this tracking, let’s go through it step by step. All right, as mentioned, we have cut this video in half. So if you want to have the step by step instructions on how to set this up, then head over to the video right there for already available or subscribe to our channel so you stay up to date when the next video comes out. Now, my name is Julian. See on the next one.

SHOW MORE...

The best way to Install Google Analytics on to a WordPress Website?

Adding Google Analytics to your WordPress site can help you track your website visitors. In this video, I will show you these 3 methods on how you can install GA to your WordPress site so you can choose which one to implement.

1. Use of Plugins
2. Install and hard code in the theme file
3. GTM deployment

🔗 Links:

GTM for Beginners series: https://www.youtube.com/watch?v=WPEdkc_feNM&list=PLgr_8Hk8l4ZHGni1H-mz2P7lbZ7PmAn1B

MonsterInsights: https://wordpress.org/plugins/google-analytics-for-wordpress/

Google Analytics https://analytics.google.com/analytics/web/

WordPress www.wordpress.com/‎

🎓 Learn more from Measureschool: https://measureschool.com/products

🔀 GTM Copy Paste https://chrome.google.com/webstore/detail/gtm-copy-paste/mhhidgiahbopjapanmbflpkcecpciffa

🚀Looking to kick-start your data journey? Hire us: https://measureschool.com/services/

📚 Recommended Measure Books: https://kit.com/Measureschool/recommended-measure-books

📷 Gear we used to produce this video: https://kit.com/Measureschool/measureschool-youtube-gear

👍 FOLLOW US
Facebook: http://www.facebook.com/measureschool
Twitter: http://www.twitter.com/measureschool
LinkedIn: https://www.linkedin.com/company/measureschool

In this video, I’m going to show you the best method on how to install Google Analytics on your WordPress website. All and more coming up.

Hey, there measuregeeks! Julian here back with another video teaching you the data-driven way of digital marketing. Now, today we want to talk about how to install Google Analytics on a WordPress website. And as always, there’s not just one way of doing things. So today, I’m going to show you actually three ways on how to install Google Analytics on to your WordPress website. And later on, you can pick which one suits you best. I will also give you my recommendation at the end of this video. Now, we’ve got lots to cover so let’s dive in.

All right, welcome to our demo software we want to install Google Analytics on. Now, in order to do this, we need to have two things in place already. First of all, we need to have access to the admin area which we can reach under our domain name slash WP admin login and now be able to install Google Analytics on your website. Be sure to have access to the back end. Second part would be to have an actual tracking ID. And this is what you can get at analytics.google.com login with your Google account, and then navigate to the account that you want to install. If you don’t have an account set up, you will be greeted with setting up a new account. Let’s quickly go through this. First of all, we want to track a website. Let’s choose an account name. Normally, you would choose your company name, then you can give your web property or the web tracking code a name. So for example, for us, it would be our demo shop. And then you enter your website URL.

In our case would be right here. Now, be sure to not have the HTTP part up here at the beginning. You can choose if you’re on HTTP or SSL in this drop-down menu. And then you can choose your industry and also your reporting timezone. Now, this is very important because you want to ensure that the timezone matches up with the timezone on your website to be able to compare data later. So make sure that this is set correctly. And you can choose if you want to take part in some more data options that Google Analytics provides. I’ll just leave them tick for now. And we can now click on Get our tracking ID. We need to agree to the data processing terms. This might differ from where you are located at. And I’ll accept this. And now we should get our tracking code. We jump right into the section. Now if you already have an account set up, you can simply go here to the admin section. And then on the property section, you find the tracking info that you can open up and go to the tracking code.

So you get to the same place here. And here’s where we get our tracking ID that we will utilize to install Google Analytics on our website. Let’s get to installing it. And I’m going to show you three methods here. The first method is through a plugin. So we’ll go down here to our plugins section and add a new plugin. And we simply type in Google Analytics. There are different plugins out there that will help you to install Google Analytics or choose the most popular option which is the Google analytics dashboard plugin for WordPress by monster insights. So let’s install this and activated and will put us in this setup screen. And we simply follow along with our Setup Manager here will connect monster insights to our Google Analytics. It will authenticate us to Google, we allow the settings and then we can choose our account. In our case, we had our tracking ID already available here, just going to copy this. And we’ll find here our view that we want to connect. And we will complete the connection. We can choose different tracking options. I will leave them untouched for now. But this is really about the customization of your tracking code. And that should do it we exit our wizard. And we should have now Google Analytics installed as easy as that. How can we verify that this is actually working?

Well, one is an extension by Google that you can install to your Chrome browser which is the Google Tag assistant. And we see here that Google Analytics is installed, but there is no HTTP response. And this is because Google Analytics is actually blocked for people who are admins and logged in to WordPress at the moment. So let’s open up a private browsing mode here. And I’m just going to navigate to my page. And now we are not logged in. And we can see here, Google Analytics is now deployed. Now depending on if this green or blue, this doesn’t really matter. But it seems like Google Analytics has been deployed correctly. We can also test this by going into our Google Analytics here. And here we see the status. And what we can do is test our implementation by going into the real-time traffic reports through this link. And here you can see that a page view was just generated. So this means that the user that is right now on the website which is us has generated a page view. So if we would go to the next page here should have another page view enter the picture. So Google Analytics is correctly installed. And this is our first method of how we can install Google Analytics via a plugin. I’d recommend this for everyone who doesn’t want to get technical and install Google Analytics in a very easy way. But the downsides might be that you have to install an additional plugin. This can potentially bog down your WordPress installation and slow down your page. So I want to show you another method of how you can install Google Analytics on your website. And this is through the installation in the theme files directly. So let’s head back into our WordPress back end. And I’m going to deactivate our plugin.

And now let’s go ahead and install Google Analytics again through the theme files. For that will go over to appearance, then theme editor. Now as it says here, it’s recommended that you have a child theme already set up that will let you install these codes into your child theme so that don’t get overwritten next time your theme updates. So definitely have a child theme set up first, then we can go ahead and proceed here. Click on I understand, select your child theme. And then find the header.php. Now, this needs to be set up in your child theme in order to edit this. So we’re going to click on it. And now we have access to the theme that governs our website, and especially the header of that theme. Now, we go back to Google Analytics and click back into our tracking information to get our tracking code. And here we have the global site tag, we can just simply copy. And it says here that we should install this in the head section. So with our theme open right here, we can add our information.

And I’d suggest to put this right under the meta tags right here. Just paste this in. The earlier the Google Analytics code will fire, the more likely it is to send data of so even if the user navigates on before the site has ended loading, you’ll be able to capture information. So now that we have this setup, let’s update our file and head back to our page. Now, we should see in our tag assistant, the global site tag is installed and Google Analytics so it’s already sending data over. Let’s look into our real-time reporting inside of Google Analytics. And here, we also see that there are page views already generated. If we go on to another page here, we should again see data coming in right here we see a new page view. So Google Analytics is installed correctly for our page. And this was also an easy method to install. If you are comfortable with copy-pasting code into your theme file if you have a child theme set up and don’t want to use a plugin to install your Google Analytics on your page. Now let’s go on to the last method that I want to show you. And this is installing Google Analytics through Google Tag Manager. Now Google Tag Manager is a tag management tool. So it manages all your tracking in one central place. And this is a Google Tag Manager container. To get started with Google Tag Manager, head over to tagmanager.google.com and create a new account, you can follow the steps as we’ve done before in our Google Analytics set up. So we had your company here, and then your website.

You’re going to go with web, and create this and then we’re entering our Google Tag Manager container. Now the first thing that we need to do, we also need to install a container snippet onto our page into our theme files just like we did before. So let’s get go ahead and follow again the steps that we just did earlier, I’m going to copy the first code that needs to be in the head section. We’re going to go into to our theme settings and our theme editor, choose our child theme here, go into our theme header PHP. And this time, I’m going to get rid of our global site tag that we have installed right here. Instead, paste our code of Google Tag Manager. Then there is a second code that we need to place beneath the opening body tag. So we’re going to look for the body where it starts right here. And right underneath going to post our Google Tag Manager, no script tag. Let’s update this file.

Now we can head back to our page, reload that. And in our tagging system, we see that we have Google Tag Manager now installed. But Google Analytics is actually not yet part of this implementation. We will need to deploy Google Analytics through Google Tag Manager. How do you do this? Well, in Google Tag Manager now, you have access to the website itself through that central snippet that we’ve installed on all the pages. We just need to deploy the tracking tool that we want to install through this Management Console. And you do this by going into Google Tag Manager and clicking on new tag and give this all a name. So we’ll be able to recognize this later. And then when we click on tag configurations, we can see all the different tools that you can install through Google Tag Manager onto your page. Now, we are interested in Google Analytics, which is right on the top right here. So I’m going to click on that. And we want to set over a page view, Now, we need to specify the account which we can do by setting up a new Google Analytics settings variable.

Here, we need to implement our tracking ID. Go over to Google Analytics, go into our tracking information and copy the tracking ID right here. Go back to Google Tag Manager, paste it in here. I’ll also take this as a name here. So I will be able to recognize this later. Let’s save this. And this is really what we would need, we just need to define a trigger right here. And there’s already one available which is the all pages trigger. So it will be deployed on all the pages. Let me fix this typo up here. And we are good to go. Let’s save this. And now we have implemented one tag into our tag manager. We can try this all out by going into the preview mode. This will put our browser into a special mode. So we will be able on our page when we reload our page to see a debug console down here which will show us which tag have fired on our page. Very practical to see if your tracking is actually deployed. And he will see our Google Analytics is deployed, we can also cross check this in our tag assistant. Here we go. The tag assistant shows that Google Analytics is deployed. And also in our real-time reporting. There’s one user right now. And here we go our page was sent and received by Google Analytics.

Now be aware once we’re in the preview mode, this is actually only deployed for you on your browser. This is not yet live on your website. In order to push this live to the website, we will need to submit a version. This is what this big Submit button is for click on here and we can give our version a name. So you’ll be able to see all the changes we have done to our container later on. Let’s publish this and it’s should be now live on our website. So if I go back here and leave the preview mode, reload our page, you now see Google Analytics is installed and Google Tag Manager. Now, don’t worry if those are not green. This just means that it’s a nonstandard implementation since you have done it through Google Tag Manager. But your data is still safely sent and received by Google Analytics.

Now you have seen that we have gone through quite some steps in order to set this up with Google Tag Manager. The big advantage to this setup is that you will be more flexible once you want to do customization and really get into advanced tracking techniques. Because not only can you deploy easily Google Analytics, but also your facebook pixel, Google Ads tracking, conversion tracking, or even set up certain triggers that trigger on interactions such as a button click or when something comes into view, or form Submit. So very versatile when it comes to expanding your tracking beyond the scope of just deploying a tracking code like Google Analytics onto your page. It also decouples what you set up in your WordPress installation. So if you ever wonder what tracking code is firing where you would be able to look this up in your central tracking tool which is in this case, Google Tag Manager. So for me, setting up Google Analytics through Google Tag Manager is the best way to set up Google Analytics as it brings a lot of advantages of expanding our tracking later on.

All right, so there you have it. This is how you can install Google Analytics onto your WordPress website. I showed you three ways. One is the plugin. One is to install and hard code, essentially, the code onto your theme file, and then the deployment through Google Tag Manager. Now, I made it already clear that I prefer the more hard way of doing things, which is the deployment through Google Tag Manager just because it makes me more flexible later on. If I want to install the Facebook pixel or Google Ads tracking later on, then I’d be able to do this seamlessly through Google Tag Manager. There are a lot of advantages. And if you want to find out more about Google Tag Manager, we actually have a Google Tag Manager for beginners course up right here that you can view and learn more about now. I’d love to hear from you. Which implementation method did you pick? Or will you change your implementation method right now onto your WordPress website? Let me know in the comments down below. And as always, if you liked this video, why not give us a thumbs up and also subscribe to our channel right over there because we bring you new videos just like this one every week. Now, my name is Julian till next time.

SHOW MORE...

How to link Google Ads to Google Analytics [Quick Tip]

Connection Google Ads to Google Analytics let’s you get better data in GA, let’s you built audiences directly from your custom segments and enables conversion tracking. Learn how you can connect Google Ads and Google Analytics with these quick and simple steps.

🔗 Links:

https://support.google.com/google-ads/answer/1704341

🎓 Learn more from Measureschool: https://measureschool.com/products

🔀 GTM Copy Paste https://chrome.google.com/webstore/detail/gtm-copy-paste/mhhidgiahbopjapanmbflpkcecpciffa

🚀Looking to kick-start your data journey? Hire us: https://measureschool.com/services/

📚 Recommended Measure Books: https://kit.com/Measureschool/recommended-measure-books

📷 Gear we used to produce this video: https://kit.com/Measureschool/measureschool-youtube-gear

👍 FOLLOW US
Facebook: http://www.facebook.com/measureschool
Twitter: http://www.twitter.com/measureschool
LinkedIn: https://www.linkedin.com/company/measureschool

Hello there and welcome back to another video of measureschool.com teaching you the data-driven way of digital marketing. My name is Julian. And in this video, I’m going to show you how you can connect your Google Ads account to your Google Analytics account. So let’s dive right in. Why would you actually want to do this? If you connect your Google Ads to your Google Analytics account, you will get much better data. So for example, here, if your accounts are connected, you will be able to get data about, for example, your keywords that will use to visit your website. This is not possible if you have Google Analytics and Google Ads running in parallel, but they are not linked. So you get enhanced reporting if you connect accounts. You will furthermore be able to build retargeting audiences of your segments.

So if you have any kind of segments that you have built in your Google Analytics account, you can go ahead and build an audience of these segments without dropping any kind of pixel on your website in order to really target people. And awesome example is this e-commerce report here, do you have that setup, you can build an audience of everybody who dropped off the cart. And then you’ll be able to build an audience of that and send these users right back into your Google Ads account to be retargeted. And of course, you will be able to utilize any kind of goal conversions that you have as conversion tracking within your Google Ads account. So you’ll be able to set up conversion tracking base of the goals that you have set up in Google Analytics. So how do you connect both accounts?

First of all, you need to make sure that you are logged in with the same email address, the same Google account that you are logged in with your Google Analytics account. So right here we have both accounts are the same, then we need to make sure that we have the right access. So in Google Ads, go over to your tools. And then in your account access, you need to have administrative account access level set up with your email address. If that’s the case, go over to Google Analytics and check here as well, go over to your admin section. And then under the property settings, under user management, you need to have edit access to this account, then you will be able to connect accounts. And it’s simple as clicking on the Google Ads linking button here in the property settings. And then if you’re logged in to the right account, you will see here, your Google Ads account ID. And that’s the same account ID that you want to connect. So we simply click here and then continue, then we can choose an account name. So for example,

that way, if you have multiple accounts that you connect to your Google Ads account, you can know where this is coming from. And then you choose the views that you want to connect and where you want to pull data from. In our case, that will just be the master view. I have three views here set up which is best practice. But you can choose any view that you want to pull the data from. You can even choose multiple here. And last but not least, you can enable auto-tagging, this is the setting that pulls in all that data from your Google Ads account into Google Analytics. So I would recommend to enable this auto-tagging feature unless you have a good reason.

Like for example, you are utilizing UTM tags, and don’t want to mix it up with the auto-tagging feature. But in most cases, I would recommend to use auto-tagging, in order to pull in all that data into Google Analytics as well. And then you simply click on link accounts. And your accounts are now linked. As it’s described here, you will be able to see more data in your Google Ads and Google Analytics account, you will be able to import goals and ecommerce conversions and also build remarketing audiences of your segmentation feature in Google Analytics. So this is how you link your Google Ads account to your Google Analytics.

Hey, there it’s me again. Thanks for checking out our quick tip video. Was that helpful? Did you understand something not quite? Then I’d love to hear from you in the comments down below. But if you liked it, then why not give us a thumbs up and subscribe to our channel right over there because we bring you new videos just like this one every week. Now my name is Julian, til next time.

SHOW MORE...

Enhanced Ecommerce Promotion Tracking (Part 2)

Google Analytics Enhanced Ecommerce Tracking can be installed with Google Tag Manager. In our last part (link below) we discovered how to track the view of a Promotion with the Element Visibility Trigger. In this part, we are going to track the click of the Promotion.

Part 1 – https://www.youtube.com/watch?v=AiONF_O9Dbk

🔗 Links:

Enhanced eCommerce tracking demo shop: https://enhancedecommerce.appspot.com

DataLayer Documentation: https://developers.google.com/tag-manager/enhanced-ecommerce#promo

Container Download: https://measureschool.com/wp-content/uploads/2018/12/EECPromo.json

🎓 Learn more from Measureschool: https://measureschool.com/products

🔀 GTM Copy Paste https://chrome.google.com/webstore/detail/gtm-copy-paste/mhhidgiahbopjapanmbflpkcecpciffa

🚀Looking to kick-start your data journey? Hire us: https://measureschool.com/services/

📚 Recommended Measure Books: https://kit.com/Measureschool/recommended-measure-books

📷 Gear we used to produce this video: https://kit.com/Measureschool/measureschool-youtube-gear

👍 FOLLOW US
Facebook: http://www.facebook.com/measureschool
Twitter: http://www.twitter.com/measureschool
LinkedIn: https://www.linkedin.com/company/measureschool

Welcome back. In this video, we’re going to take a look at how we can track our enhanced eCommerce promo clicks with the help of Google Tag Manager and our custom JavaScript variable. So like in the last tutorial, we already had a closer look at how we can set up such a dataLayer inside of a custom JavaScript variable. Now, we want to also track our actual clicks. Now, these enhanced eCommerce tracking dataLayers was built the same. But for our dataLayer here we have a promo click as the action. And this is something we would need to change in our tracking deployment for promo clicks. So let’s take a look at the specification here. Down below, we here have the measuring promotion clicks. And we want to do the same as with the other one. Now, I’m going to just copy the whole thing here, the whole dataLayer push. Okay, so this would be this year, going to copy this and going to go over to Google Tag Manager and build an enhanced eCommerce tracking promo view. I’m just going to copy this and going to call this enhance promo click. Now, we had our dataLayer before, I’m just going to replace this.

So here we have our dataLayer. As I said, we are not really pushing anything into the data, we just need the eCommerce object. So we can get rid of anything right here, dataLayer push and back here. Now, this is built, especially for a tracking scenario where you would forward the user on and you want to ensure that the data is actually transferred. This is done within the event callback, we can get rid of this portion as it is deployed through a variable here. So I’m going to get rid of these data points as well. And this should give us our enhanced eCommerce tracking object except for the event up here. This one is also something we wouldn’t need as we are not deploying a dataLayer. We want to simply have our eCommerce data object. Now, you see this promo object ID, project object name, and so on. This actually needs to refer to the same data that it was actually viewed. So we need to have the same data in here as we had from the one that is viewed. So I’m going to just save this, for now, go over to our view here and copy out our promotions view here. All right, let’s go over to the click data and type that in as we had before. So now we are clicking on the same data as via viewing. And if you know about enhanced eCommerce tracking, you know that you need to keep data consistent. Otherwise, the data reports inside of analytics won’t be filled correctly. So we have this now prepared. And again, we need to go through and build a tag for this. In our case, this can also be copied. So let’s copy our event here. This time, it will be a promo click event. Also going to change the event tracking parameters, this will be a promo click. And we obviously want it to pick up different data, not the view data, but the click data. So this is now specified as well. And we want to change our trigger out. So let’s click here and get rid of our visibility trigger. And in our case, it would be simply a click trigger. So let’s go here for our clicks. And I’m going to go with the all elements trigger. And let’s keep it generic for now, I’m going to build a generic click trigger.

Let’s save this. Before we move on, I need to configure my built-in variables. So we actually have our click element, click ID, and so on enabled. Let’s refresh our previous debug mode. Go back to our page and see how our variables get filled. I’m going to click on the ad. Now, this didn’t do anything. Let’s refresh here again. Oh, that’s why we had a semicolon error in our class some JavaScript variable. Let me just figure out what this is all about. It’s probably simply because we have some white space here. Let’s get rid of this and save this, refresh. And this time it does it. Okay refresh our page and I’m going to click on this with the command keypress. We have our GTM click our EE promo click already fires, that’s fine, but we want to restrict it to only fire on our ad. So we’re going to look into our triggers here, all variables and we see here our click classes get filled. And we have some information here about the click classes. Let’s go with the WP image 71. So if that’s inside of our variables filled, then we want to fire this so I’m going to turn our generic click trigger into a specific one on our ad click and I’m going to install a filter and that filter will be on the click classes if it contains WP image 71. Let’s save this. And again, try this all out.

Press this button and we see our click has fired. If I click anywhere else, it also generated GTM click but nothing fires. So this works fine. And we have now deployed our data. Let’s see if it is received by Google Analytics. Let’s go back to the real-time reporting on the events we see that there are some new events here. We had our promo click, three times promo click and that data should then also have attached our enhanced eCommerce tracking data. We can actually check inside of our let’s go on to inspect here this will open up our developer tools and we have under the console. Let’s reload our page actually. Here is our Google Analytics information. The page view has fired now also our page promo view should have fired and now click with the command keypress. Yes, we get our data in here as well the creative and so on. Everything that we have filled in. This time it’s a promo click so that data was transferred over to Google Analytics. We already saw this here in the enhance eCommerce click was just registered. Now let’s look into our conversions under eCommerce reports, marketing, and internal promotions and go to the right date.

And we see our internal promo clicks were also registered here. So this data was transferred correctly.
Now, this is it with this little tutorial. Just to recap, we have put in the right dataLayers into an enhanced eCommerce tracking variable. And this is a custom JavaScript variable that just returned our eCommerce object with the right data. And then we have triggered an event tag through Google Analytics that transport that data over to Google Analytics correctly. So it doesn’t use the dataLayer. It doesn’t read from the database, it reads from our custom JavaScript variable. And this is how you can fill these reports without actually deploying a dataLayer. But doing everything through Google Tag Manager, which is quite beneficial if you have only one promotion running on your page just like this.

All right, so there you have it. This was it with our little tutorial here on promotion tracking with enhanced eCommerce tracking features. Now, it’s always astounding to me that you can utilize all the built-in mechanisms of Google Tag Manager such as the element visibility trigger and then also the click trigger to make this deployment happen. I’d love to hear from you if you run into any problems or if you want to use this tracking deployment. If this helps you please leave us a comment down below. I always love to hear from you guys. And if you liked this video, then give us a thumbs up and also subscribe to this channel if you haven’t yet because we bring you new videos just like this one every week. Now, my name is Julian, til next time.

SHOW MORE...

How To Track The Initial Traffic Source with GTM (feat. Julius Fed from AnalyticsMania)

Google Analytics by default attributes the last known source to the User. But what if you wanted to know which source initially led to a conversion?

In this video, Julius from AnalyticsMania will show us how we can track the initial source of traffic, save it to a cookie and port it into a custom Dimension.

#InitialTrafficSource
#GoogleTagManager
#Measure

🔗 Links:

Script used: https://gist.github.com/measureschool/47a5ec08dff86ca117196abf5ce746f4
AnalyticsMania: https://www.analyticsmania.com

🎓 Learn more from Measureschool: https://measureschool.com/products

🚀Looking to kick-start your data journey? Hire us: https://measureschool.com/services/

📚 Recommended Measure Books: https://kit.com/Measureschool/recommended-measure-books

📷 Gear we used to produce this video: https://kit.com/Measureschool/measureschool-youtube-gear

👍 FOLLOW US
Facebook: http://www.facebook.com/measureschool
Twitter: http://www.twitter.com/measureschool
LinkedIn: https://www.linkedin.com/company/measureschool

In this video, Julius is going to show you how you can track the initial source from where your user came from in Google Analytics. All and more, coming up.

Hey there and welcome back to another video of measureschool.com teaching you the data-driven way of digital marketing. My name is Julian. But today we have a guest and he’s back on the channel again. Julius from Analytics Mania has joined us to show us a new tracking technique. Now, you probably know in Google Analytics, how to view your source data and where your user that came from. Well, that’s oftentimes just half the truth because it’s heavily based on sessions, which means that you really just know where your user that came from last but not initially. If you wanted to track that you would need to explicitly track it in Google Tag Manager, for example. Now today, Julius is going to show us how we can track that information in Google Tag Manager, and then forward this on to Google Analytics. So we have it available as a custom dimension. Now we’ve got lots to cover. So Julius, take it away.

Thanks, Julian. One of many awesome Google Analytics features is acquisition reports. Thanks to this information, you’re able to see where your users are coming from, whether it’s a Google search, email, Facebook traffic, or any other sources. Every time a new visitor session starts, Google Analytics checks where that visitor is coming from. But what if you want to track the very first traffic source that drove the visitor to your website? Luckily, that is possible with the help of Google Tag Manager and some custom JavaScript. Before we continue, I would like to mention that custom JavaScript that I will use during this video was based on the UTMZ cookie replicator created by the team of Lunametrics. But keep in mind that the code that I will use is a bit modified compared to the Lunametrics code. All right, so let’s start. Here I have a Google Tag Manager container that has two items in it, the Google Analytics page view tag and Google Analytics settings variable. Now, the first thing that we need to do is to get a JavaScript code that reads the UTM parameters, the referral data, and all other information related to the traffic source of the visitor. And that information is then stored in a first party cookie that we will use in our Google Analytics tag. And here is the script itself, you will find the link to this code in the description of this video. So just let’s copy it and go to Google Tag Manager tags,

create new tag, tag configuration, choose custom HTML and paste the code. Let’s name the tag, CHTML, which stands for Custom HTML. And let’s call it Set that initial traffic source.Let’s fire it o n all pages, at least for now. And let’s take a look at how it works in action. Hit the Preview button and go to the website that you are currently working on. Click Refresh. And here’s our preview and debug mode. Now, we need to check whether the cookie that contains the initial traffic source information was actually created. If you are on a Chrome browser, collect this three dots in the top right corner and choose more tools, developer tools. Go to application, and under the storage section, choose cookies and click the domain that you are currently working on. Keep looking for a cookie that this called initial traffic source, here it is. And as you can see, the UTM campaign source is direct, UTM campaign medium is none, and UTM campaign name is not set. That is because I landed on this page just by entering the address in the address bar. Now let’s see how our custom JavaScript code works under the circumstances. But before we do any test with that code, first, you need to delete the initial traffic source cookie. So let’s do that. And now let’s imagine that I want to find on Google search Analytics Mania. And if I click this link, let’s see what happens. As we can see our custom HTML tag that says the cookie has fired successfully. Now let’s go to our cookie list and see what happens there. Our initial traffic source this time is Google organic and campaign name and the keyword are not set. So as you can see, the custom JavaScript works as expected. And now let’s proceed to another step. By the way, it’s worth mentioning that when a visitor lands on a page, the Google Tag Manager with that custom JavaScript checks whether the initial traffic source cookie exists on a browser. If it doesn’t exist, then the cookie is created. If it does exist, then the script does nothing. So this means that if the initial traffic source cookie exists in a browser, Google Tag Manager will not override it and keep its original data. The next step that we need to do is to create a variable that reads the initial traffic source cookie. Why because by default, Google Tag Manager does not recognize this information. Because for example, if we click on window audit event and go to variables, you will not find any information related to the initial traffic source. So in order to read that cookie and turn it into a variable in Google Tag Manager, we need to go to Google Tag Manager, click variables, and create a new user-defined variable. Choose the first party cookie type and enter the initial traffic source. That’s called the cookie. Click Save. And let’s test whether it’s working properly. So refresh the preview and debug mode. Always refresh the preview and debug mode first, and then go to the website and refresh the page. Choose any event you want. For example, page view. And let’s click variables. What you’ll see is that the cookie, the variable actually returns the value of the cookie. Now what we want to do is to push this data to Google Analytics as a custom dimension. First, let’s go to Google Analytics and create a custom dimension. Go to admin, choose the property where you want to create a custom dimension, choose Custom definitions, custom dimensions, and create a new custom dimension. That is called initial traffic source, choose the scope of the user and create a new dimension. What we see here is that the index of our dimension is one that’s copied. And let’s go to Google Tag Manager and update our Google Analytics settings variable.

Let’s expand the settings of our variable, click More Settings, then choose Custom Dimensions and enter the custom dimension. And we want to pass to the custom dimension number one, the value of our cookie variable. So click the button right here, and choose the cookie initial traffic source variable. Click Save.

Now one last thing that we need to do is we need to make sure that the cookie is set first before the Google Analytics tag fires. Therefore, what we need to do is we need to go to the tags section and click on our page view tag and go to Advanced settings and click the tag sequencing. We want our cookies setting tag that custom HTML tag with custom JavaScript, we want it to fire before that Google Analytics page view tag fires. So here’s how it works. When the page loads, this custom HTML tag will fire first. And after that tag has fired, then Google Analytics page view tag will follow. And it will use the cookie that was created by this custom HTML tag, click Save. You don’t need to set the custom HTML tag and tax sequencing on all Google Analytics tags, it’s completely enough to set it on only Google Analytics page with that because when the page loads, then this tag will fire first, it will set the initial traffic source cookie. If that cookie does not exist yet, then the page view tag will fire. Since we configure the custom HTML tag to fire every time before the Google Analytics page view tag, we can now remove the all pages triggered from that custom HTML tag. So let’s do that. Let’s close this one, go here and remove the all pages trigger. This tag will not have any triggers set but it will fire anyway. Because we have included that this tag and the tag sequencing. And that is displayed right here. So click Save. Last but not least, and it’s very important, we need to test whether this implementation works properly. First of all, let’s refresh our preview in debug mode, go to the page that we are currently working on. And let’s delete those cookies. Because we want to test everything from A to Z. So go to developer tools. And let’s remove the cookie that is initial traffic source. Enabled assistant Chrome extension. And finally, let’s refresh the page.

So what happened right here is that our custom HTML tag has fired successfully. Well, at least we think that it fires successfully. Now, let’s check whether it did the job correctly. Let’s go to developer tools, application. And then we see that our initial traffic source has been set and the traffic sources direct and medium is none. So half of the job is completed successfully. Now, let’s go to the tag assistant Chrome extension, click on Google Analytics and see what data was passed over to Google servers. So click here. And we see that there is a tab called custom metrics. So we see that in as a custom dimension number one the value of our cookie was set. Now do not fear, it doesn’t look that nice compared to the value of our variable right here. That’s because the equal sign is encoded right here. But if we check the Google Analytics reports, we will see that this strange code will be actually displayed properly as an equal sign. Let’s take a look at how the initial traffic source looks in Google Analytics reports. So head over to Google Analytics. Here, I have the acquisition reports of source and medium. And with the default GA functionality, you are able to see the last traffic source that was attributed to goals. Of course, if I had some data right here. But thanks to the initial traffic source, you’re also able to see what was the very first traffic acquisition source of those visitors. So you can do that by adding a secondary dimension and the initial, and here it is.

And here’s the data. Ignore the first line I was just playing around with that custom HTML tag. So this is the result. But as you can see, everywhere else, we see not only the last traffic source but the first one as well. So this might give you some new ideas and insights on how traffic sources are contributing to the success of the business. Now, another thing that you need to keep in mind is that this data will not appear in your GA reports right away. It is not available in real time reports, because real-time reports do not display custom dimensions. Also, this data will not appear pretty soon in your regular GA reports. For example, in my case, it takes up to several hours. But usually, I am ready to wait for up to 24 hours. So this is a really important thing to remember. So that’s it. Now we know how to track the initial traffic source of a visitor. This allows you to see the very first source from which the visitor landed on your page.

Now, before you start implementing the solution by yourself, you need to understand the caveats of this solution. First of all, it is based on cookies. So that means that if a user visits your website from another device, or the visitor just simply clears the cookies in the browser, the initial traffic source data will be lost. And when the visitor lands on the page, again, the initial traffic source will get some new value, which will probably be inaccurate. Another caveat is that if you are using cross-domain tracking, and if the visitor navigates from one website that belongs to you to another, there’s a chance that you will see the self-referral data. And unfortunately, this script does not support the referral exclusion list of your Google Analytics settings. That’s why you might see self-referrals in your Google Analytics reports. Additionally, if a person has visited your website some time ago before you implement this initial traffic source tracking solution, there’s a high chance that the value of the initial traffic source parameter will not be accurate, because the script cannot access the historical data of the visitor. However, if you want to go with a more robust solution, you should cooperate with a developer and ask that if the developer would push the initial traffic source data to the data layer. And then you would use that data in your Google Tag Manager container and push that further to Google Analytics or some other third party tools. So that’s it. I hope that you found this video useful. And if you have any questions, just post the question below the video or go to analyticsmania.com and contact me in person.

All right, so there you have it. This is how you can track the initial source of where the user came from in Google Tag Manager first of all, and then forward this on to a custom dimension in Google Analytics. Now, I’d love to hear from you. How would you use that information when once you have it in Google Analytics? If you have already built this in what insights did it give you? Please share with us in the comments down below. Now big thanks to Julius from Analytics Mania. He has a great blog that you should check out at analyticsmania.com. And if you wanted to be on the channel because you want to share a cool tracking technique with us then please reach out to [email protected] and maybe we’ll see you soon enough on this channel. Now, as always, if you like this video, please give us a thumbs up and also subscribe to the channel right over there. Because we bring you new videos just like this one every week. Now, my name is Julian. Til next time

SHOW MORE...

🔴 Connect your Cookie Consent Form with Google Analytics AllowAdFeature flag

GDPR has raised the question how we could enable and disable Advertising Features in Google Analytics via Google Tag Manager – Previously there was no good way of doing this programmatically, but in this Live Stream we want to take a look at the new feature of allowAdFeature flag in the Field to Set options to turn this on/off based a cookie consent

#GDPR
#GoogleTagManager
#GoogleAnalytics

🎓 Learn more from Measureschool: https://measureschool.com/products

🚀Looking to kick-start your data journey? Hire us: https://measureschool.com/services/

📚 Recommended Measure Books: https://kit.com/Measureschool/recommended-measure-books

📷 Gear we used to produce this video: https://kit.com/Measureschool/measureschool-youtube-gear

👍 FOLLOW US
Facebook: http://www.facebook.com/measureschool
Twitter: http://www.twitter.com/measureschool
LinkedIn: https://www.linkedin.com/company/measureschool

In this video, I’m going to show you how you can connect your cookie consent form with the AllowAdFeatures from Google Analytics. All and more, coming up.

Welcome back to another video of measureschool.com teaching you the data-driven way of digital marketing. My name is Julian. And on this channel, we do marketing tech review, tutorials and the occasional live stream. So if you want to be here live, then consider subscribing and also click that bell notification so you will be notified once we go live. Now today, I want to talk about with you about the Allow advertising features in Google Analytics and how to connect it to your cookie consent form. We’ve done a video previously on GDPR compliance with Google Analytics. And that video, I basically showed you how to turn off all the different features of Google Analytics to become GDPR compliant. You only do the base tracking that Google Analytics actually allows you to do by default. And in this video, or I got a lot of questions on how to actually turn on the advertising features of Google Analytics. That’s the demographics reports, but also building remarketing audiences by a Google Analytics programmatically. So you’ll be able when somebody clicks on a cookie consent form and says, Yes, I accept to these terms that you will be sending out that data again to Google Analytics, to double click and to Adwords. Now, this was a bit tricky previously, because Google Analytics didn’t have a programmatic flag to actually say, Okay, I want to turn this on, I want to turn this off for this user. But now they have built in a new field that we can trigger with Google Tag Manager in order to connect the form to the actual advertising features. So without further ado, let’s dive into this training.

First of all, what are we talking about here? When we have the ability in Google Analytics apart from the website and clickstream tracking that we have set up with the Google Analytics js code to send our data to different other services. One of the services is double click, which gathers information and then feeds it back into Google Analytics through the demographics report. So you can get data like the rough estimates of the age of the users or their interest, agenda, for example, here as well. And this is a feature that you have to turn on. The other feature that you need to specifically turn on is when you have an audience here, you can always turn that audience into a remarketing audience. So you can build a remarketing audience that then sent this over to AdWords and you can remarket to users directly from Google Analytics. Now, these are not really third services since Google is one company. But it goes out of the scope of Google Analytics. So previously, you had to turn these features on in your tracking information, you have your data collection here. And here are two features, the remarketing features, and the advertising features that you had to turn on in order for this data to be gathered. That will turn something on in your tracking code, and then send that data over to these other services and remarket the user.

Now in GDPR terms, you might want to turn these features off, because the user has consented to actually being tracked through these other services and especially giving that data over to these other services. But it was all right if you actually informed the user about it, and got his explicit permission. And once you have the permission, you may want to turn these features on again. Unfortunately, that was not a programmatic way to do this in Google Analytics to say to Google Analytics, okay, now the user has consented, please now collect that data. But they have now introduced a new field in the analytics JS library that will allow us to turn these on programmatically. And this is the AllowAdFeatures. And it’s a line of code that you would need to programmatically put into your tracking code. Or you can deploy this via Google Tag Manager as well. So whenever somebody has consented to being tracked, you could deploy this tracking code and therefore be able to track this data in Google Analytics and build remarketing audiences. So today, I want to show you how you can actually accomplish this because there were some questions on how can I connect my cookie consent form to this AllowAdFeatures. Okay, first of all, you need to have a consent form. In the basic sense, a lot of people have like a little toaster plugin or something that pops up says, Okay, here’s my cookie policy. And here’s my cookies that I set. And do you agree to this? I have installed on this page, a very simple one that you can download from silktide.com. And it will give you the complete code that you can just pop into a custom HTML tag, that’s what I’ve done. And this will then on every page fire and pop up on your page. Now is this fully GDPR compliant? I don’t want to vouch for this, it is definitely a form of consent, where you have to click a button before something happens. The mechanism here is really that it just wants to once you click the button sets a cookie, and then you won’t be followed around anymore. But if the user doesn’t want to get this pop up anymore, he needs to say yes, to the cookie policy. And it will follow him around. I don’t know if this is best practice. And it’s according to the law. There might be other more sophisticated platforms out there. Nonetheless, the techniques that I want to show you right now about how you can actually connect that it to Google Analytics. So if you have a different cookie consent form, just use that and see how the cookie actually gets set. Now, once I click on this Got it button, a cookie be will be set in my browser. So it can open up the developer tools, which will find up here under more tools we have the developer tools. And then I can go to the application settings, up here is the tab applications and on the left side, we’ll find our cookies down here that are set on our website. Now we have some Google Analytics cookies, but also a new cookie called cookie consent dismissed and it has the value of Yes.

So if I reload this page now, we still have that cookie, it is safe on our browser, and we don’t see our cookie consent form anymore. Now, if I delete this cookie and reload the page, obviously, this cookie consent form will reappear. So here we have the cookie consent form. So it just checks whether it was agreed to or not. And then it will show it or not. For us, we can use that in our Google Analytics deployment. Now, again, if I click on Got it here, I can click on the refresh button for the cookies. And we should see here or cookie consent dismissed is now set to Yes. Now, how can I tell Google Analytics once the user has clicked on God it that he should deploy this advertising features? Well, in Google Analytics itself, you will need to first of all turn on these features. So they need to be toggled on. There’s also another way to do this in Google Tag Manager. But once you decide to turn this on, you can do that on the server side in Google Analytics directly. So you don’t have to mess with Google Tag Manager itself. By default now, all of these people who get tracked by Google Analytics will be also sent over that information. And that’s something we want to avoid. We want to only send it over when somebody has actually agreed to this. So we need to build something into the measurement side extra to this to allow this advertising features only for certain users. And let’s dive into Google Tag Manager. First of all, I have deployed here a Google Analytics page view tag pretty simple and I haven’t chosen to use the Google Analytics settings variable, you can definitely do that. And it sends us over to my account. And now we have here a field to set option. Now in this filed to set option, we can modify this to enter our AllowAdfeatures. Now, this is the name of the field and we can set it to a value, this value is either true or it’s false. Now, by default, the value is actually set to true. So the allow advertising features are sending over this data. And if we now wanted to change this programmatically based on the user input, we would obviously need to somehow have access to the cookie and then pull it into our Google Analytics field. For now, let’s save this and try this out on our page. First of all, just as field and see what the console says, we have, well, let’s go back into our Google Tag Manager and actually put Google Analytics or our Google Analytics tag in a certain mode. And that mode is under Advanced configurations we’ll set the use debug version to true. And that will give us some useful information into the console. We could also do this by the GA debugger extension, which I also have installed. But it’s nicer to do this on where people can actually try it out. And here, we see what data was actually sent over to Google Analytics. And we can see this tracker set AllowAdFeatures to true which is by default, anyway, set to true. So it doesn’t really make a difference. Now, the data would be sent over to Google Analytics to AdWords and to double click so we can get that information into Google Analytics. All right, now, we want to set this off from a perspective of the the user if the user hasn’t yet agreed to our cookie consent form. How would we do that? First of all, we would need to have access to our cookie right here. How can we get access with Google Tag Manager to our cookies? Well, there is a variable that’s built into Google Tag Manager, where we’ll just go to variables over here and click on a new variable. And as a type will choose the first party cookie. And that’s how you can get access to your cookies that are installed on your browser. And for us, we can just take our cookie name here. In our case, let’s go back and see this is the cookie name Cookie Consent dismissed. Let’s copy this and put that in here and click save. Well, I’m going to give this a name as well. So we know what it is. And set Refresh. Refresh our page. Let’s close this. And if you go to variables now, click on an event, we see that our cookie was set to Yes. So our Google Tag Manager now picks up the value of the cookie and it is set to Yes, and in this case, I want to send over the AllowAdFeatures. Now, one hurdle. The next hurdle we need to take is actually that our field our allow advertising features field only accepts values that are true or false. It’s a boolean value. So we can feed into this field the yes or no, we would actually intelligence furthers into a yes or into a true or false. How can we do that in Google Tag Manager? There is another functionality of a variable, which is the lookup table variable. And the lookup table variable basically takes an input and rewrites that into the output that you want. In our case, we can go to the a new variable, build a new lookup table variable, right here, lookup table, it’s what’s called. And here’s where we take our input variable. In our case, that would be our cookie, and whatever is inputted in that cookie. So if the input is yes, we want to actually turn us into true. If the input is oops deleted, true. If the input is no, we want to turn this into false, which is not really a value because we didn’t see that in our cookie, we can’t really set this value to know no. What would be the negative case here if the user hasn’t yet hasn’t yet agreed to our terms? So if we go back here, and just delete our cookie consent, or our cookie and reload the page. Now, in this case, the user hasn’t yet agreed to our cookie, right on our privacy policy. And therefore, we don’t want to send that data over. And what does our input actually say, in terms of the variables that we have in here, the cookie is undefined, it’s not yet set. And therefore, we could take that undefined value and translate it into false. So let’s go over here, undefined, and set that to false. Let’s rewrite this into a lookup table for our cookie consent. All right, let’s save this. And Refresh. Refresh our page. And now let’s look into our variable, we have our cookie consent dismiss is undefined. And therefore our lookup table variable will be set to false. What happens when we click on Got it? Well, first of all, nothing happens. Because we don’t have a new event in here. If we reload the page, now that the cookie was set, we should a new value in our variables the cookie is set to Yes. So our lookup table is set to true. So now we have rewritten the inputs here into true or false. And that’s something we can now use in our Google Analytics tag. So let’s go over to tags and go to GA page view, and then click on the field to set options here. And we’ll set our value not by default to true, but to a variable that we can access here. And this is our lookup table variable. So let’s save this, record refresh. And I’m gonna first of all, clear the cookie again for our test case. Now that’s cleared I’m going to reload the page and Google Analytics fires. Now, what data is actually sent over? We can see that in our developer console because we are still in this debug mode. And we see that our AllowAdFeatures was turned to false we haven’t yet agreed. In every consecutive pageview, if I go around the page without clicking on the gutter button here, I will not be sending that data over to double click and I won’t be setting a remarketing pixel. So that data for this user at least because it hasn’t agreed yet is not available in analytics will not go into our audience demographics reports and also not in our remarketing list. Now once the user has clicked on Got it, every consecutive page view, so if I go to the next page, or just reload the page, this will be set to true automatically. And as long as the cookie is sticking around. So if the user doesn’t go to another device, or doesn’t clear his cookies, or goes into a private browsing mode, we’ll see still be able to use that user or the data will still be sent over to our advertising features, such as a double-click, and Adwords. So it works as expected. And this is really how you can install this and connect your cookie consent form to this new AllowAdFeatures. Now in the end, first of all, let’s get rid of our debug version True. So it doesn’t always log this to the console. And the other thing that I need to tell you if you want to deploy this is obviously to use a Google Analytics settings variable, then you only have to configure this field to set option once in your Google Analytics settings variable. And if you have any other tags, such as event tags, this obviously also needs to be set. But with the Google Analytics settings variable, you only have to do it once in the variable itself, then reuse that variable inside of your Google Analytics tag. I didn’t do this year because we just have a one-page view tag and obviously, if you’re done with your tracking deployment, everything works as expected. Submit this as a version and give this always a name. And publish this to all your users so it goes live. All right, so there you have it. This is how you can build in your or connect your cookie consent form with the help of Google Tag Manager to the AllowAdFeatures in Google Analytics. Now, I’d love to hear from you. What precautions Have you taken when it comes to the GDPR? Do you have more complicated cookie consents form? How have you handled that previously? And if you haven’t yet, then why not consider subscribing right over there because we bring you new videos just like this one every week. Now my name is Julian, the next time.

SHOW MORE...

How To Test Your Tracking Codes Before Installation

When customizing your JavaScript tracking codes you can run into all sorts of different problems. To avoid never ending back and forth with your developer you should test your codes beforehand. In this video we are going to use the JavaScript Console and Snippets to test our Tracking codes before implementation.

#Measure
#Tracking
#GoogleAnalytics

🔗 Links:

Chrome Developer Tools: https://developers.google.com/web/tools/chrome-devtools/
Snippets in Dev Tools: https://developers.google.com/web/tools/chrome-devtools/snippets

🎓 Learn more from Measureschool: https://measureschool.com/products

🚀Looking to kick-start your data journey? Hire us: https://measureschool.com/services/

📚 Recommended Measure Books: https://kit.com/Measureschool/recommended-measure-books

📷 Gear we used to produce this video: https://kit.com/Measureschool/measureschool-youtube-gear

👍 FOLLOW US
Facebook: http://www.facebook.com/measureschool
Twitter: http://www.twitter.com/measureschool
LinkedIn: https://www.linkedin.com/company/measureschool

In this video, I’m going to show you how you can test your tracking codes before you actually implement them in Google Tag Manager onto your website or pass them on to a developer. All and more coming up.

Hey there, welcome back to another video of measureschool.com teaching you the data driven way of digital marketing. My name is Julian, and today we’re here in our new studio. It’s still a work in progress, as you might hear, but nonetheless, I want to talk with you today about a little technique that I use to test my tracking before I actually implemented into Google Tag Manager or pass it on to a developer. Why is this important? Well, we have all been there, you go through the tracking steps, implement your tracking, and at some point it’s supposed to work but no data has received, there could be a multiple and a host of reasons why this is. But one might actually be that the tracking code that you are supposed to implement is malformed because you may have done some customization sort of tracking code, added some parameters, and suddenly, something is not working. Now to make sure that you’re tracking code is actually working correctly, I often test my tracking codes before I actually implement them into Google Tag Manager or pass them on to a developer that way, we don’t have these feedback loops of going back and forth, and later finding out well, the tracking code, the JavaScript code that we actually are supposed to implement was malformed. Now, Chrome gives us some great tools in order to accomplish this. And that’s what I want to show you today. So let’s dive in.

All right for this tip, we’re going to start out on our website where we want to test our tracking before we actually put it into Google Tag Manager hard coded onto our website, or send it on to a developer. You know these tracking codes that you get from Google Analytics, for example, here in our admin section, we have our tracking information, tracking code and here’s a little bit of JavaScript that you need to install on to the website. So how can we test the beforehand? Inside of our browser, we have access to JavaScript through our developer tools. And we can open them right here on the right side, we have more tools. And there is our developer tools, this will open up our developer tools. And he would get a panel that shows us the HTML markup representation, the document object model of the website that we are looking on right now. By the way, you might be seeing something like this, it’s just that you can’t change the site’s up here of where the panel is displayed. For our purposes, we want to first of all, look at the console, it was this is our direct access to JavaScript inside of the browser. So whatever we type here needs to be JavaScript confirm, and can be executed right away. So for example, an alert statement, press enter, and the JavaScript is right away executed, we get this alert statement from JavaScript, and therefore can use this to execute JavaScript inside of our browser. What if we wanted to execute this JavaScript? Well, it’s not actually just JavaScript here, because we have script tags, which are HTML. And then we have a little script blog right here, that is actual JavaScript. And first of all, what this script does, it loads this library from Google Tag Manager, let’s just copy this URL right here, and open up this new tab, it’s much more JavaScript, this is the complete library of the gtag. And let’s just mark this all and copy it into our browser here and paste it in. Let’s press enter, and it executes, nothing really happens. Because this is just a library. Now, we want to test our tracking. And this is down here inside of the script tags. Let’s copy that, go back to our page and read it as well, press enter, nothing happens again. But inside of our tech assistant, we see that there was a page view generated, we also should be to see this in our real time reporting that there was a page view that was just generated for this account. So here we go. So again, we can already test our tracking inside of the developer tools. Since now the library is loaded. And we have this configuration set up, what if we wanted to send an event into Google Analytics. Or let’s look up in the documentation of the gtag how to send events that’s right here, let’s copy this and try it out. Inside of our developer tools, we need to enter an action. So in our case, it would be test tag or test event,then we have a category and a label, I will omit this last value here.

And as you might notice, I’ve entered valid JavaScript with these quotation marks around my values, that the representation for string, I also got rid of that last comma here because we didn’t want to use the value, which also shows that this needs to be valid JavaScript. Otherwise, you would get an error and it wouldn’t be executed correctly. But again, if I would have the comma in here, press Enter. And that’s doesn’t do anything to the gtag. So correct, says automatically the library. But normally, it wouldn’t be valid JavaScript, and you would have an error in there. But again, you can test this all out beforehand. And now we would see up here that there has been an event fired, and that should also be visible again, inside our events right here. So here is where the event fight, right. So you can test already these codes inside of the console, as long as you provide it with pure JavaScript, so the browser can interpret it. But as you might have seen, it was a bit cumbersome to go through these lines here with my up and down arrow key. And if you make a mistake, you don’t have any way to go back and forth between your versions. So what I would recommend if you have larger code blocks, just like this one, to use another method, which is under sources tab. Now, in the sources tab, you normally look at our HTML, here is the representation it gets downloaded by the browser, different libraries, different platforms. But there’s also a little tab right here on the snippets, if you don’t see that you can probably activated in your settings where you can input complete blocks of code. So for example, I can go here with a new snippet. Lets call this Facebook pixel.

And he I can enter my JavaScript a little code editor right here. So let’s go over to Facebook. Right here we have our code. And this is a bit of HTML bit of JavaScript. Let’s just copy that and input that here. As you can see, we have our code editor, it already complains here about at this is not valid JavaScript. So let’s get rid of our script tags here and also the no script tag. And here we go. This is our Facebook pixel. Here’s the library that gets loaded. And then the initiation call and the track call for the page view. By the way, if you want to prettify something, you can format it here. So the format it and you make it a little bit more readable in terms of functions, for example, that are written out and so on, you can do that with any kind of code. And then if you want to execute it, so press enter, like on the console, you simply click down here, and it will run the code and open up in the window below here the console again, you can get rid of that by clicking the X you can get it back by pressing the Escape key. So this has execute now. And we see in our Facebook pixel helper that the page view was fired. But we actually want to try out a another track call. So let’s go to the second step here, which will let us add events. Let’s say we wanted to add a purchase, we enter a conversion value five and the currency euro and we get our code. Let’s copy this to the clipboard and also paste it underneath here.

Now again, they are script tags in there to delete them. And let’s execute this. We get our message down here that something happened. And in our Facebook pixel helper, we also see that a purchase was now sent over to Facebook. So these are tools the console and the snippets are really great for trying out tracking codes before you implement them by Google Tag Manager, hardcode them or send them on to your developer. By the way, the snippets can be saved. Now this is an unsaved one. But if I press my command or control key S we see that this is now saved. And if I close and open up the browser, again, this will still be here it will be saved with the settings of the browser. So it’s really a great alternative if you don’t have a more powerful text so editor available such as VS code or Sublime Text to edit your JavaScript.

Alright, so there you have it. This is how you can test your tracking before you actually implemented it into Google Tag Manager or pass it on to a developer. If you have other techniques that save you time. This saves me so much time and I’d love to hear from you in the comments down below. And if you haven’t yet, then maybe consider subscribing right over there. Because we’re bringing you new videos just like this one every week. Now. My name is Julian. Till next time.

SHOW MORE...

Google Analytics Audit – Our Process for Optimal Data Quality

Google Analytics Audits is the very first thing we do to assess our clients analytics standing and understand their business better. In this video, I will share with you the 5 Google Analytics Audit Steps we do here at Measureschool.

1. Questions & Communication
2. Technical Audit
3. Prioritize
4. Suggestion and Recommendation
5. Reporting

#GoogleAnalyticsAudit
#GoogleAnalyticsAudit
#GoogleAnalyticsChecklist

🔗 Links:

Google Analytics Checklist https://measureschool.com/checklist
Data Quality Score (by Brian Clifton): https://brianclifton.com/example-audit.pdf
Successful Analytics Book https://kit.com/Measureschool/recommended-measure-books/227061-successful-analytics

🎓 Learn more from Measureschool: https://measureschool.com/products

🚀Looking to kick-start your data journey? Hire us: https://measureschool.com/services/

📚 Recommended Measure Books: https://kit.com/Measureschool/recommended-measure-books

📷 Gear we used to produce this video: https://kit.com/Measureschool/measureschool-youtube-gear

👍 FOLLOW US
Facebook: http://www.facebook.com/measureschool
Twitter: http://www.twitter.com/measureschool
LinkedIn: https://www.linkedin.com/company/measureschool

So you want to put your Google Analytics skills to use? Well then in this video I’m gonna show you our process how we do Google Analytics Audits. All the more coming up. Hey there welcome back to another video of Measureschool.com. Teaching you the data-driven way of digital marketing. My name is Julian and today we want to talk about Google Analytics Audits.

Now if you want to put your Google Analytics implementation skills to use, you’re pretty advanced maybe already, and are working as a freelancer and want to start working with clients, where do you actually start? Well, most of the time we start with an audit in our practice of our services because we need to determine what data is already there, how is this data gathered, is this data of high quality, and is it worth going into the data maybe changing something around, tracking more for the client making his implementation more useful, and then also analyzing giving him insights, and the change that he wants. But it really starts for us with this crucial Google Analytics audit in order to determine the state of their analytics. So in this video, I’m gonna show you our process on how we do Google Analytics Audits here at Measureschool. Let’s dive in.

All right the first step is like any analytics project out there is starts with good questions. First of all, you should talk to your clients and figure out what that Google Analytics implementation is all about. How do they use Google Analytics? What kind of type of company is this? How does their business model maybe relate to Google Analytics and what you can track on their website? And crucially what do they want to get out of Google Analytics? Maybe again they’re already set expectation what Google Analytics can do and what it can’t do, and we’re an audit would be helpful. Now you can already do this in your selling portion of the audit or maybe you have that information already available. But an audit is only as effective as you have communicated it to the client and you have gotten the right input to look for the right things in the right lens so to say when you go through the Google Analytics account and determine the data quality. This already will give us valuable hints on how Google Analytics can be implemented on the client’s website and on features that he might be missing out on and how we can proceed after we have done the audit? So definitely you’ll have a long conversation with your client for the audit.

The second step is the Technical Audit portion. Now, this is really where you put your Google Analytics skills to use. You probably have a checklist of different Google Analytics features to check for and make sure that everything is working correctly. We have a list here at Measureschool that you can download. I will link that up down below. But this is really where all your skills come inspiration. You need to be a little bit advanced to understand how the data is actually flowing into the account, how you can make sure that the quality is correct, and maybe also dig into their data to find any anomalies so you can investigate them in their tracking system. Not all of the checkpoints will be relevant to the business that you are looking at. So maybe they don’t need cross-domain tracking because it’s just one website with one URL.  And there are other features that might be more important like UTM parameters and so on. It’s really a useful tool to have your own checklist if you want to go through and make sure that everything is tracked correctly and configured correctly. This will also give you a great documentation for later and a grand overview of how the state is of their Google Analytics account.

 

Then in the third step, you want to Prioritize. Now Google Analytics implementation is not one-size-fits-all. So not all the features will be relevant for the business that you are looking at. There might be a Content business or an eCommerce business completely different feature sets that need to be implemented and prioritized. So how would you do such a prioritization? Now I’m a big fan of Brian Clifton’s approach where he scores the data quality in a report. You can find a template on his website. I’m gonna link that up down below.  And it’s also in the great book, Successful Analytics. But what he does in this report is actually looks at the broader areas of your Google Analytics account and scores them and weights them in accordance to his framework. And that will happen later determine an overall Google Analytics data quality score that will tell him in which percentile clients’ Google Analytics account is in. Then he can determine for example if they are under 50%. And it doesn’t really make sense to start with serious analytics with that data that they have in the account. But rather should work on certain given areas in order to get over that 50% and be able to do serious analysis with that data.

Now once you have prioritized you want to come up with a treatment. You want to suggest or bring up recommendations. So it’s not only enough to just go through the points and say this is not working, this is not implemented. But rather going back to these crucial prioritized points and making suggestions on how to fix them. There might be something easy like fixing the tracking code which would be pretty high on the list if this is not working. Or other things like event tracking that is important particularly for this business and website. Now coming up with these recommendations is a crucial point of the audit portion because you want to bring your clients results. And they shouldn’t just be left with a checklist that determines if something is working or not. But really giving them recommendations what are the next steps, how can you go from maybe and beginner analytics level to an advanced analytics level, and up your game in the data quality department. So definitely come up with some suggestions and some recommendations for fixes in their Google Analytics account or for better tracking in general.

Last but not least, you want to report that data. Now, this can be in different forms and shapes. Some people write a big report where they have treatments and suggestions in there as a word document or PDF that they can also show to the management and be passed around in different departments inside of the company. It could also come in a form of a simple checklist with the recommendations in a sheet. Or you are actually presenting that data and lobbying for the change that you want to see in the company. So this report is really a final delivery to end the project and have a clear cutoff point for your findings and also suggestions. But it’s also a great starting point for further engagements. So if you actually implement these changes or come up with these treatments who would be better suited to implementing them than you.

All right these are the steps that we normally take when we do analytics audits. If you’re interested in getting an audit from us then I have a services link down below. And if you have already done analytics audits for clients then I’d love to hear from you as well if you have any suggestions down below in the comments. Now my name is Julian, till next time.

 

SHOW MORE...