How to Exclude Internal Traffic From Your Facebook Pixel

How can you exclude internal traffic, like yourself, your team or your whole company from seeing your Facebook Ads?

You might be familiar with a feature in Google Analytics, where you can filter out certain traffic from IP addresses, for example, that you don’t want to have included in a data set. If you’re not, then check out our free course on how to set this up.

Unfortunately though, in Facebook Ads, we don’t have this filter functionality built-in. 

Continue…How to Exclude Internal Traffic From Your Facebook Pixel

How to Setup Site Search in Google Analytics

Site Search is a useful feature in Google Analytics as it helps us understand what keywords people are entering into your website search box.

In this video, I will be sharing how you can configuring Site Search on your website using the query parameter in the website URL that appears after a search.


Google Analytics

In this video, I’m going to show you how you can set up Site Search in Google Analytics to track the searches users perform directly on your website.

Today, we want to talk about how you can track the internal site search of your website with the help of Google Analytics. There’s actually a technique where you don’t have to install too much because you have already Google Analytics installed by just configuring Google Analytics. And it will start tracking your site search which is really helpful if you want to try to find out more about what your users actually searching for. Chances are they are using your site search and this is valuable information to and fills with the intent of the user on the website. So you definitely should not miss out on this data if you don’t have it installed, yet. So without further ado, let’s dive into Google Analytics and configure our site search.

All right, to get started, we are here on the official merchandise store of Google. And we actually have access to the Google Analytics of this website. There’s a link in the description down below how you can get access to it as well. And here we go. This is the Google Analytics merchandise store demo account for Google Analytics. And here we see that data. When we go down here to the behavior reports. And under site search, we see that there’s all kinds of tracking data about what has the user search for on the website. So when you type in anything, right here, an internal Site Search gets triggered, and the search results are displayed right here. So how can you configure this for your own website so you know what the user has actually searched for? Google Analytics has built-in functionality to pick up such searches and it’s all based on the URL of your store right here. In the back of the URL, we have a query string. And you can see this by looking at the URL and seeing the question mark, and everything behind the question mark is called a query string. And here we have certain information that is encoded in this query string. One distinct information right here is the keyword equals test. Now, test is what I put into the search bar earlier. And therefore this is the actual search term that we would like to record. Let’s try another one.

And we get to the results page. Some results are not quite relevant. But who’s complaining This is after all, the merchandise store of the largest search engine in the world. But here we see again, our keyword t shirt that we just put in. And this is something we would like to track in Google Analytics. Now every time you enter a new page, information gets sent over to Google Analytics by default. With the tracking code that you have installed this information gets sent and a page view is recorded within Google Analytics. Since the URL is also transferred to Google Analytics, really what we just need to tell Google Analytics is that we have a certain key here that always afterwards after the equal sign has our keyword. So how can we tell this to Google Analytics to pull this up? It’s actually pretty easy. It’s under the admin section here. In your reports, you can go to View Settings. And under your view, down below here, we have a section called Site Search. This needs to be turned on. And then we just need to put in our key that has our search term in there. So Google Analytics knows where to look for this. Then we can choose to strip this actually out of the URL. So when we look at URLs inside of Google Analytics, we don’t see keyword equals whatever the search term was. This is particularly important when you don’t want to have your reports broken up by search terms. Optionally, we could also do such categories. But that’s something that would really need to be in your query string as well, in order to make this over. So now that you know how to do this, let’s try it out. On our demo shop right here, we have also a search field. And I’m going to put in a search term. And we’re getting to the result page with our keyword right here. Now when we look in the URL, we again see a query string. And our search term is encoded in this query string. And this time, it’s preceded by an equal sign with an S. So S is actually the key that Google Analytics should pull up. So within our Google Analytics account, let me switch over.

We again can go to our admin section right here, go into the view settings. And then when we scroll down, we have our site search setting, toggle this to on. And then we need to put in our query parameter. Now, this is exactly what needs to be in front of the equal sign right here. So Google Analytics will be able to identify it. Again, here is S, before it was keyword and merchandise store. So let’s go ahead and put this S into Google Analytics. And let’s strip this out for now. And we leave the site search categories untouch. We don’t have a category parameter. Anyways, and then we simply save it, we get the success message. And now we should be able to view our data inside our site search and search terms. Now, unfortunately, when we search something, and it gets sent over to Google Analytics. It goes through a processing engine, and therefore, it will take a while till we get results into our report to see what the user has searched for. So we don’t see any data right now. But when we reload this page, hopefully in a few hours, we’ll have data in our report.

So this is how you can set up Site Search tracking with the help of Google Analytics and your query parameters. By the way, if you don’t have query parameters in your search box, then you would need to track your site search separately. And you can, for example, do this with the help of Google Tag Manager. But that’s a question for another video. All right. So there you have it. This is how you can configure your Google Analytics to pick up your internal site searches. Isn’t that a neat feature of Google Analytics? Now, you might be thinking, I don’t have something in the URL itself. And I can really use that technique. There are other techniques and Google Tag Manager out there how you could do this, please let me know in the comments down below that I should do a video about it. I’m not quite sure and what your exact problem is. And then maybe I can we can figure it out together in the next video. And if you’re looking for more support on Google Analytics, Google Tag Manager and all things data then You might want to check out our premium membership measuremasters. I have it linked up down below. This is where we put all our premium content, give you support, and have an awesome community of other marketers as well. So definitely check that out. Now, this is the end of the video. And you know, if you haven’t yet then you maybe should subscribe to our channel right over there because we’re bringing new videos just like this one every week. Now my name is Julian. See you in the next one.

How to Label Users in Google Analytics with Google Tag Manager

It’s common to label or tag your users in your CRM, but how can you do it in Google Analytics? In this tutorial, we’ll discover a simple technique to label our users directly in Google Anlaytics on our Website. And of course, we’ll do this with the help of Google Tag Manager

FREE GTM Course:

FREE Google Analytics Course:

In this video, I’m going to show you how you can label a visitor within Google Analytics with the help of Google Tag Manager. All and more coming up.

Hey there measuregeeks, Julian here back with another video for you. Today we are live on the channel. This is a live recording. And we’re gonna give you a little bit of a tour of how to label a visitor within Google Analytics with the help of Google Tag Manager. If you want to be online and actually asked questions which I’m going to answer after this recording, then a new few seeing this actually after the fact and you should definitely subscribe to our channel and hit that bell notification icon. So you’ll be notified once we go live here on this channel again. Alright, today we want to talk about how we can label a visitor within Google Analytics. What does this actually mean? Well, if you have a CRM system like MailChimp, or Active Campaign, or HubSpot, you might be familiar that you be able to go into a contact record and actually assign a tag to a user. You can label this user or tag this user and say, Hey, he bought this product, or he has… he’s a newsletter subscriber, for example. That is valuable information that sticks to the the user profile of the user inside your CRM system. And then you can backtrack later on or filter by the tag, for example, all the users who have this tag. We can actually do the same in Google Analytics. And this can be quite useful because we can also filter and segment our users within Google Analytics, and maybe one or the other user group or a user who was tagged in a certain way and is behaving in a different way. So you can look at for example, all your past customers You are ecommerce shop, or you’ll be able to look at everybody who has logged into your product. And if you are a SAS or a tool that requires a login, and you could look at all these users and segment them out for looking for prospects or looking for people who have logged in who are actual customers already. Or people who you actually want to filter out as well. So, for example, internal users of your platform, users of the colleagues, for example, you could tag these people who come to your Google Analytics and filter those people out so they don’t pollute your analysis later on in Google Analytics. So labeling visitors can be quite useful within analytics. And today, I’m going to show you how to do it. So let’s dive into a little demo here. I’m gonna switch over to my screen right here. Let’s put this on to the top actually, and we’re here in our demo shop. Now in our demo shop, we have already installed. as you can see down below, Google Tag Manager and the normal Google Analytics pageview tag. Now, I want to introduce a little bit of a case here, where what we want to install today. So let’s say we want to label all the visitors that come to our page, who are already newsletter subscribers. Because we, for example, don’t want to analyze our newsletter subscriptions based on the users who have already subscribed, but the people who haven’t subscribed yet and see how we can optimize the website. So we would need to attach an attribute, a property to the user and to use a record within Google Analytics. So how can we find users who already subscribe to our newsletter? Well, when we send out a new setup, for example, I sent this newsletter to myself here, we can put in links that point to our website. And once I click this link, hopefully your links are UTM tagged. So when we go to this website, we have a UTM tagged link right here. And that tells Google Analytics which column, which road to put them in into our source medium reports. You might know about this, if you don’t know about this, you should definitely check out our video on UTM tagging. But we can actually use this information as well to tag our user as a new set of subscribers. So every time a user comes to the website to this link, then that’s something we should tag later on.

Let me just check over here and see, okay, let’s go on. I’m just checking the sound here. Let’s go on and this information is now available on this page. At least To the US and also to Google Analytics. So within Google Tag Manager, we can go ahead and take this user information app. And or take this as a trigger and fire a new attribute to Google Analytics and tell Google Analytics this is a user who is a newsletter subscriber. Now, how do you tell Google Analytics this? And this is where Custom Dimensions come in. Now, custom dimensions are attributes that you can attach to data. Every time you send over data to Google Analytics, like a page view or an event, you can add a given role to or a new column to the data set. And obviously, you know, when you send over page view, the page URL gets sent, or the screen size of the user gets sent, or where the user just came from, gets an and parameters get sent. We can actually attach customer information to it and tell Google analytics this is a newletter subscriber or not.

So first of all, we would need to configure in Google Analytics. Let’s go over to Google Analytics, our custom dimension. So where we can do this and this is customer information, go into the admin section here. And in your property settings so in the middle row here, you can go under the custom definitions, and here you have custom dimensions. And you can see I have already set up some custom dimensions for this account. But if you’re new to this, you can click here on new custom dimension, and enter a name for your custom dimension. You can call this whatever you want, for example, in our case would be is this user a subscriber? Now then you use the scope, the scope, that’s something you need to configure. And this is really about where you want to attach this information and how it gets processed. Now, I don’t want to go into deep into scope. We actually have another video of what is scope in Google Analytics, you should definitely check it out. If you don’t know what scope is, but what this functionality will do is when we use the user scope here, it will attach it to the user in Google Analytics. So as long as the user has the same cookie, or the same client ID or the same user ID, this information will persist throughout his user record. And this is very important because we only can, we only need to fire our custom dimension once when the user comes, for example, to this landing page. And then this information will persist throughout his lifetime of being a user in Google Analytics. So we can create this I won’t do this right now because I actually have a custom dimensional aleady set up right here. And once you once you click create this dimension, you will get this little window here. And the information that you really just need is the number of the dimension in our case, it would be four.

So if we click cancel here, we see also the index is number four. This is a number you need to remember. So now inside of our demo shop here, well, actually this one, we want to fire a custom dimension every time somebody comes with the UTM source newsletter. So I would say let’s, we can do this in different ways. But since we are looking at the URL right here, let’s build a custom variable, first of all, that will detect what is in the UTM source, or maybe take UTM medium. Let’s take yeah, let’s take UTM source because maybe you’re sending out an email that is not a new setup. So let’s go ahead and Google Tag Manager and just build a custom variable. So user defined variable and This will go into our URL scope. Or we’re looking at the URL type. And we’re going to look at UTM source. UTM source is a URL right here.

And then we’re looking at the query parameter, which is UTM Source. If you don’t know what query parameters are, this is also something we explain in a video. But I can pull out whatever is behind the equal sign of the UTM source right here. This is a query string, and the parameter of this query since UTM source and we want to pull out the newsletter. So I’m gonna put this here in here. And let’s save this internet is slow because I’m actually streaming at the same time. Refresh this, go back to our page. And let’s reload this page actually going to close this page.

Alright, well, this loads pretty slow. Okay. Now our previous debug mode is loading. And we should be able to see in our variables here that our UTM source is now newsletter so pulled out directly this what I wanted. Now I need to have some functionality in there to tell Google Analytics if this is the newsletter, then turn something to true. Why do I want to do this? Because I want to send in an attribute to Google Analytics and to this describe a column subscriber column of the value of true so I need to rename this somehow. And I can do this with a easily you can do this with a custom JavaScript variable. But another way to do this would simply be a lookup table. So I’m going to build a lookup table variable. That will look into my UTM source variable. And every time it finds news attender vagaba, I want to rewrite it into true.Alright, that should do it. Let’s refresh and try this out again.

And now we should see can all see this in slow mo here. That our lookup table variable that we have just built is now true because we have this newsletter industry. So let’s do a negative test, let’s say just whatever. If the user doesn’t have the source newsletter in there, this should just turn undefined, hopefully. So here we have lookup table undefined. Now undefined is very important because Google Analytics will actually ignore undefined. And therefore we can just put it in there. And this is really it ready, we can now attach this to our Google Analytics, pageview tag. So in Google Analytics, we already have a pageview tag created I have done this beforehand. And here in the settings, you can override enable override settings. And that’s how you get these two menus down here. If you don’t want to do this, you could also put this into the Google Analytics settings terrible for simplicity sake, I will just unable to override settings And here under more settings, I will go with custom dimensions. And here I need to enter the index. So as you remember the indexes right here we have our index is number four. And therefore I will put in the number four. And then the dimension value will be the value that I want to push actually into discussing dimension. So into this column that I have prepared. And I want to push in true if the user is actually a new set of subscriber, if it’s not a new set of subscriber, I want to just have undefined and there because Google Analytics will ignore this. All right, let’s go ahead and simply use our lookup table variable to fill in this dimension value. Let’s saved this

and refresh. And now if a user comes from a newsletter link

comes to the page, our Google Analytics page view tag should fire and the page view tag, we have our custom dimension defined, which will pull out from our lookup table variable, which in turn pulls out from our URL variable. And therefore it should say true as the variable festival. Yes, he it’s true. And then for the page view, it didn’t find this one. But it fired here, the page view we can see here that the field to set know, here Custom Dimensions index is true is now set to true. Now we can also look this up in our developer tools. So if you have developer tools open, you can enable this extension GA debugger. And this will give you some information about what was sent over to Google and analytics. And right somewhere, here we go. So if you see this part right here, we have the dimension value four is true. And if you have a negative test right now, again, let’s go with just this XXX. The user comes maybe from another newsletter or he comes from a completely different source, YouTube, Facebook and so on. He has not yet a new set of subscriber. Now I don’t want to set this field to false because obviously, this user might be a new set of subscriber already coming through a different source. Just want to set this to undefined. And right here, you can see that this is actually not part of the hit because Google Analytics ignore this information. It still tries to configure the tag. We see here, index for dimension value undefined, but in the actual Hit that gets sent, this information is not part of it. Now, it’s a bit tricky to see this information now in Google Analytics. Well, it’s tricky to see it. But it’s tricky to actually debug this information. Because in the real time reporting itself, we will not see custom dimension values that get sent over, we only see if there was a page view generated, which there was a second ago. But unfortunately, there’s no way to see like in the events, what data was sent over. The only thing that we can hope for is to check back in an hour. So when that data is actually processed. And hopefully in the user explorer report, you’d be able to see the user. So for example, we need to go to our date right here. And you know how every user gets a client ID going to go into the developer tools and look up my client ID here.

I have a client ID

with 661. And in Google Analytics, we have one user with a session three sessions already 661. And then right here, you should see subscriber custom dimension is true. Unfortunately, this has not yet been processed. So it’s not in here quite yet. But we should see this later on as a subscriber true. Now, how can you use that data in Google Analytics, then? First of all, you could build a custom segment. So as you might be familiar with custom segments appear, can build a new advanced custom segment. Oh, here we go. We can just say a new segment and every user that has a way to go, just go with the condition filter, every user who includes the attribute, subscriber, and this is what we have named The custom dimensions so we can find it here. subscriber contains true or equals true.

Exactly matches true. So we have one user 50% of users who are most definitely website, we can say, subscribers. Now we have a segment where we have filtered down to everybody who is a subscriber. And this will actually persist. So if if the user goes to the next link and clicks on, I don’t know clicks on this link, the user property within Google Analytics will persist. So this user will stay tagged or will stay labeled as a subscriber. This is also true when you want to, for example, filter out user so you could build a filter based on this and say the view setting or inside of the filter settings right here. You could filter by people who have this attribute, right, so you could build a filter and say only subscribers or without subscribers. And this will be a exclude field, we want to exclude users who have not yet in here.

Here customer mentioned subscriber filter pattern is true. So you will exclude everybody who is a subscribing you can use it in the exclude filters. And you can also use it I’m not going to configure this and you can use it in any kind of other report. So for example, if you go to our all pages report, this is just an example you would find this others of you always know you have a table down here. And now if you would like to only look at subscribers, so right now we’re looking at subscribers because we have a

Custom segment on here,

you can add this as a secondary dimension subscriber. Now, I will tell you if this is true or false. For so far, for our case, it would be true. But if we have a subscriber that doesn’t have this attribute, this would be empty, it would be filtered out actually automatically. So in the end, you can add this to any kind of table that you would like to just be aware that there is something called scope in Google Analytics. So you can mix and match all the data together. So if you get weird results, like no results at all, it might be that you’re running into this problem of scope in your reports. You can also customize a build a custom report. So we can go to custom reports here and create a new custom report for all our subscribers. And we add a metric now this needs to be User scope. So we will go with users and add a dimension, which is our subscriber dimension. So we have added a custom dimension to tag the users on the website. So we have one user who is true. And we actually see if our older users who when I was testing earlier, are tagged. No, not yet. Alright, so this is how you can then see this data in Google Analytics. Don’t forget, if you want to take this live to all your users, you will need to submit this as a version and publish this so it goes live onto your website. So you be henceforth tracking all your users and labeling them when they come to your website.

So this is already it’s with a little demo on how to label users with the help of Google Tag Manager in Google Analytics. Now this might be useful if you, for example, want to filter out users who are coming to a login page and login to your website. Or you want to filter out everybody who is actually already a customer comes to the thank you page, or you want to filter out or filter for people that have done a certain action. With Google Tag Manager, you can be really flexible in doing this and I hope you’ll come up with some other use cases that might be useful to you. And yeah, I’d love to hear from you in the comments below, as always.

And if you haven’t yet, then definitely subscribe to our channel right over there because we bring you new videos just like this one. And if you want to be live, definitely, definitely subscribe because we go live and I’ll answer questions after this video. So if you want to be part of this next time, subscribe to the channel. And let me know what you thought of this video and comments down below. Now my name is Julian, see you next time, in the next video, see you in the next video.

How to Set Up Google Analytics App + Web Property

A new version of Google Analytics has recently been released: The App + Web Property. It has a few new features compared to what we are usually used to. It’s still a work in progress, but it shows us the future of Google Analytics. In this video, let’s go through how you can set up the App + Web Property and whether or not I recommend you completely switch over to this new version.

🔗 Links:

App+Web Help:

FREE GTM Course:

FREE Google Analytics Course:

In this video, I’m going to show you how you can set up the new version of Google Analytics with the help of Google tag manager. All and more, coming up.

Hey there measuregeeks, Julian here back with another video. Today, we want to talk about how we can set up this new version of Google Analytics. It’s the app + web property. So completely different Google Analytics that you known from before. And it actually comes with some new, cool functionality that will take a look at in a second. So how would you set up this new version of Google Analytics with the help of your Google Tag Manager? You might have seen in Google Tag Manager when you set up a new Google Analytics tag that there’s a new tag type. Right here, which is the app + web configuration and an event as well. And it asking for your measurement ID. For this, let’s go over to Google Analytics to get this measurement ID. You simply go into our Google Analytics account. Here under the admin section, we’ll go ahead and create a new property under whichever account you want to create your new property. And now, we have here, the web, the app, but also the app + web version. So you can send in data from your mobile apps by Firebase, and also your web tracking.

We’re going to set this up for web. So let’s click on this and continue. And now we get this proper name. You can select your category, reporting zone, and your currency. I will just leave this untouched and create this. And now it’s asked us how do we want to set this all up? Since we are on the web platform here we go with web and we simply need to put in our webpage and give the stream this data stream a name. Now, the cool thing about this new kind of tracking it will allow us to measure certain events automatically. That means we will get information about scrolls, outbound link clicks, side search, video engagement and file downloads. All without having to set any of these up. There’s actually a menu here that we can utilize to turn certain events off. So for example, if you don’t want scrolls, we can just leave this off and save this. But for demonstration purposes, I would like to leave this on. We create a stream. And we here have now our stream with the stream ID and the measurement ID. So we can just copy the measurement ID and go over to Google Tag Manager and put our measurement ID right in here. We just go with the normal all pages tag and save this. Gives this all a name and save this. And then we refresh our page. Go back to our demo shop. Get rid of that and we see our page view tag firing inside of Google tech assistant, we see a global site tag firing. This is our account ID. And now in our Google Analytics, we can go over to this new stream view of real-time. And voila, we see somebody from Germany just came to our page. So this already works without any extra setup. Now, as you have seen, there were some events that were automatically tracked. So if we scroll down, we should see more of these events coming through. Let’s go back to our real-time reporting and go into the Events tab here. And we have three events, you can actually go to this view snapshot. This will open up a random user that is currently on our website.

It doesn’t quite work for me.

Here we see the different events at least. So you see a page view that was tracked first visits, session start. But unfortunately, the scroll events didn’t quite work just yet. Maybe we should go to another page, you should see some data coming through. And this time we see the user event right here. So here we can see a nice timeline of what just happened. What was the interaction that happened. In our case, it was a scroll. So this also works as expected. Unfortunately, there are not many users on this website as a test website. So don’t see much. But this is now correctly installed. And we don’t really need to enable any more events, but we could. So if you want to send something over explicitly, there is a new tag template that you have already seen. So when we go over here, we’ve really seen this app + web event. And the tag configurations can be taken over from our previous tag. So we don’t have to actually configure a Google Analytics settings variable. We can give our event a name, and put in different event parameters.

Now, what would we put in here? Like in Google Analytics before we have an event name, you can name this whatever. And you can actually put in any parameters that you want into these fields. But in terms of the reports that are already inside of the interface, you might want to choose one of the pre-existing events that Google Analytics has defined. So there are recommended events for all sites and apps, retailing, eCommerce, jobs, education sites, travel and games. Let’s go for all sites here. And let’s just pick one of these. Let’s say we wanted to track a purchase, just like this. So there’s an event name called purchase. We’ll put this into the event name. And then we have a transaction ID and transaction value. And some other values, I won’t fill them in now. And just for demonstration sake going to fill in some hardcoded values. Obviously, you would utilize your variables and your data layer to fill them dynamically. But I’m just going to go ahead and test this here. Then fire this all on a confirmation page. So page view confirms where the page pass entails order received. This the correct name, let’s save this.

And this is our GA app + web for our event of a transaction. Let’s refreshes and go through a quick order here on our page. And we see our event fired right here. You should also be able to see this in our tag assistant. No, it’s not yet updated. Here, I think the tag assistant doesn’t have the functionality built-in quite yet. So we will need to go into our analytics dashboard here and see if there was a new event by this user. It doesn’t show us something at the moment. But hopefully, we should see this in this overview. so here we go see an eCommerce purchase. And this came from this user, this should tell us that our eCommerce purchase was reached which also creates a goal. So this is how you can send over page views and events via Google Tag Manager. Don’t forget, if you want to put this live to users, you need to submit a version and take this live. And henceforth, we will be tracking this for all your users. Now that we have gone through an installation let’s take a look at this new version of Google Analytics and quickly scroll through some reports. I’ve been tracking with Measureschool for a little while here. So I have app + web property already created. And it’s quite different from what we have seen previously from Google Analytics because this is actually based on the app version of Google Analytics, which some people know as Firebase. So this is a part of a version of firebased analytics to the web. And we now get all the reporting functionality. We already looked at the real-time reporting. These are standard reports. But they obviously don’t have the functionality of the old version of Google Analytics, or the current version of Google Analytics, which is Universal Analytics. You would find some of the similar data in these reports. But this is far more sparse than what we have inside of the universal analytics. So you won’t find any kind of enhance eCommerce reports or landing page reports as this is really based on events. Rather than the page view and session model that we have in the current version of Universal Analytics. One or two reports that I want to point out here are the analysis section where we have the capability of building different reports like a funnel analysis, a path analysis, we can also look at our different audiences with this new segmentation feature set of this report. And we’ll be able to explore our data just like we would inside of Data Studio with a new picker of what we want to see in our reports through this drag and drop system. So all in all, I would encourage you to try this out. You can install this right now onto your webpage and track it in parallel. Should anyone give up the old Universal Analytics version and then switch over completely to App + web, I wouldn’t recommend this as it’s still quite limited. But it shows us the future to come with Google Analytics. So definitely check it out. And let me know what you think in the comments down below.

Hey there it’s me again, this is how you can set up your app plus web-property of Google Analytics, the new version of Google Analytics with the help of Google Tag Manager. Let me know what you think about this new version of Google Analytics. It’s quite half baked. But it’s quite interesting to see the steps that make forward and go away from that model of the page views. So I love to hear from you as well. Let me know in the comments down below. And if you haven’t yet, then consider subscribing to our channel right over there because we bring you new videos on data, tracking, and analytics, Google Tag Manager every week. My name is Julian. Till next time.

How to Create Custom UTM Parameters via Google Tag Manager

In this video, let’s go through the process of creating custom UTM parameters so you can easily track whatever UTMs you like and then see them directly in Google Analytics. This comes in handy for things like discounts and other UTM variables not part of Google’s defined set. We’ll be doing this with the help of Google Tag Manager.

🔗 Links:

Google Tag Manager

FREE GTM Course:

FREE Google Analytics Course:

In this video, I’m going to show you how you can create your own UTM parameters to include your custom value and transfer this on to your content tracking. So you have that information available in Google Analytics. All the more coming up.

Hey there, Julian here back with another video for you. Today, we want to talk about how we can create a custom UTM parameter. This is actually a question that came from Ahmad who wanted to know how to do this. And the premise really is, what if you have exhausted your UTM parameters that you have in your URL, and you want to have customer information that is transferred into your Google Analytics? Well, this is actually something we can do pretty easily with the help of Google Tag Manager and then forward this all on as a custom dimension to Google Analytics. So we’ve got lots to cover. Let’s dive in. All right, to introduce you to our scenario today we have a newletter here, we have different links to our website. And these links, obviously UTM tag, which means they have this which Google Analytics reads automatically and transfers into campaigns, which you can later look up to see where the traffic came from. So for example, here on the acquisition campaigns, you’ll be able to look at all the different campaigns that you have. If you are filling out the UTM term, you might be able to fill out the keyword column or other columns, like the source medium column, right here. So I’ve built this link with the actual official campaign builder tool here, which is simply a form, which you link and then we have these fields available, the source medium, the campaign name, term, and content. Now three of these are mandatory, but the others can be filled out if you want, or you can leave them empty. But let’s say you wanted to differentiate from our newsletter here. How much discount I get 90% off, 50% off, 20% off. Unfortunately, all of our forms are here filled, we won’t be able to add this to our information of our campaign UTM sources, and also, frankly, doesn’t quite fit in any of these. If only there was a way to add my own UTM parameter that I just make up, just like, let’s say, discount equals, and in this case, it would be 90%. Now, unfortunately, when you come to the page, Google Analytics won’t grab that information because it doesn’t actually understand it as you are going out of the rule set of UTM parameters and creating your own custom UTM parameter. So today, I want to show you how you can send us on to Google Analytics nonetheless, and thus create your own UTM parameter. To get started, we need to read this information first of all, so we have the value of the 90 here inside of a variable. So we’re going to go ahead, I already have Google Tag mentioned. So to Google Analytics page, your tag, just into Google Tag Manager, and build a new custom variable, and this will be a URL variable for discount. Let’s go ahead and choose the URL type from our variable menu. And we want to get the component of the query. And here we want to look for a special key within the query. And if you don’t know what the key is, its thing in front of the equal sign, we actually have another video on this show. I’m also going to link up down below how these query strings actually work. But we are interested in this key to pull this value out. So we simply need to know the key. Okay, this is the key and go back to Google Tag Manager and enter our discount here. That should do it. Let’s save this and try it all out. Going to go over and refresh our preview and debug mode. refresh our page and upon the page, you we should have have our variable available now, which is our URL discount variable and it holds the value, whatever is filled in here as a discount equals, let’s just try it out, see if it’s dynamic.

And as you can see, this value changes if there’s a different value appear in the URL. So now we have captured this via the variables. And we now want to feed that information into Google Analytics. And we’ll do this via a custom dimension. So if you want to make up any of these dimensions yourself, you can build custom dimensions. How do you configure them, just in the admin menu, just under your property settings and this column in the middle, we can go for the custom definitions and here we will get the Custom Dimensions I already have some created here, but I will go ahead and create a new one, which will just call discount, and as the scope we choose session as our UTM paramenters are also scoped to the session and keep it active as creators. And all we would need right now is just to know the number right here, which is the dimension number. And in our case, it would be three. So how do we now build this into Google Tag Manager, it’s actually pretty straightforward. inside of our Page tag or any other Google Analytics events, we will need to build in this custom dimension. Right here under the override settings, you can go on the more settings, and here, will see the custom dimensions, we need to add the index, which in our case was three, and then dimension value. In our case, it was this URL discount. So the dimension number three will be filled with whatever is in the URL as value. This is how you can set up a custom dimension in a single Google Analytics tag, you would probably need to go through all the Google Analytics tag. If you wanted to do this method. We can also actually build this into our Google Analytics settings, variable directly. So let’s do this, as it’s actually the recommended way of building in custom dimensions, especially if they are scope to the session. Go ahead and go into our Google Analytics settings variable. And here we have the same settings available for the custom dimensions, you go with the index three again, and then choose our variable, which was our URL discount right here. Let’s save this and refresh. And let’s go into the preview mode. And here we have our UTM tag link with the 50 attached. And our page to tag file. Now we can look up in our tag assistant will send over so we have Google Tag mentioned. So Google Analytics here. And this sent our one page request with the custom metrics of dimension number 3 and 50. So this data was sent over to Google Analytics just fine, but how can we now see it inside of our analytics. Let us go back to our acquisition reports. And we have here all traffic, let’s go to the source medium. We have the right data here, and we see our newsletter email. And we can simply go up here to our secondary dimension and type in our discount. And here we get our custom dimension. And it’s not, it’s filled, probably because we just set up the page a second ago. Be aware that this can take a while up to one half an hour, or even longer to this is calculated. So we just need to check back later if this actually works. But here’s where you would find that data. You can edit actually to any other session based report to know which discount did the user get if you want to look at an ecommerce report and see through which discount email that the user come you would find this into this field and you just need to activate it as a secondary dimension. So what we have done in essence is extended the data set of Google Analytics with another dimension and dimension that is custom to our needs. And this is a great example for customizing your Google Analytics installation to fit your needs. Don’t forget, if you want to take this or live in the end, go over to Google Tag Manager and submit this as a version. So this will go live to all your users.

Alright, so there you have it. This is how you can create a custom UTM parameter. Will you use this technique? Where would you find this useful? Let me know in the comments down below. And if you haven’t yet, consider subscribing to our channel right over there because we bring you new videos just like this one every week. Now my name is Julian. See you in the next one.