When I generate a lead I get the values passed on via the URL Query which is the following:
?fname=[value]&lname=[value]&email=[value]
I’d like to know how I can carry this query over to the next page as well? (so the URL is passed over two pages instead of just the one).
So it would flow like this:
LeadPageExample.com -> Lead entered details -> LeadPageExample.com/Upsell?fname=Alex&lname=Smith&email=asmith#email.com -> Lead clicks on cancel or add to cart (I want fname=Alex&lname=Smith&email=asmith#email.com to be passed on again) -> LeadPageExample.com/checkout/?add-to-cart=312&fname=Alex&lname=Smith&email=asmith#email.com
Essentially I want the fname=Alex&lname=Smith&email=asmith#email.com query to be re-attached to the next link and passed on twice in this scenario.
To illustrate:
LeadPageExample.com/checkout/?add-to-cart=312&fname=Alex&lname=Smith&email=asmith#email.com
Any ideas? Is it possible? If so, how?
To be even more specific, I ONLY want this to happen on specific webpages on my wordpress site.
Thanks so much for the help.
I use the following query parameters in Google Analytics:
start-date=2017-10-01
end-date=2017-10-01
metrics=ga:users
When I filter by ga:pagePath==/charity/ the result is 100.
When I filter by ga:pagePath=~/charity/ the result is 139.
When I filter by ga:pagePath=~/charity/;ga:pagePath!=/charity/ The result for some reason is 71. How is it possible?
Moreover, if I add the ga:pagePath dimension when I filter by ga:pagePath=~/charity/ I can see that the results add up to way more than 139. In fact, it shows that users for /charity is 100 and the rest of URLs add up to 137 (counted them manually). Could someone, please, help me to understand what am I missing here?
I wager that at least part of the problem is that you query a user scope metric and filter by a hit based dimension.
A user can see multiple pages that contain "charity" in the url, so the total from all pages is more than total users, e.g, if one user has seen page /charity/a and page charity/b the rows would add to two users, but the absolute total is just the single person.
I have created the dimension, it's currently my only one so it has index 1. It has session level scope and is active.
I have also created a custom report to see any results I might get from it. All the report does is show the Session metric against my custom dimension. Nothing extra such as filters.
In my code (which until now was unmodified) I have added the following line between the 'create' and 'send' calls:
ga('set', 'dimension1', 'test');
Nothing is appearing in the report, or anywhere else when I use this dimension as a secondary dimension.
I have tried on a second GA property of mine and it also doesn't work there.
What am I doing wrong?
Generally, it takes 1-3 hrs for the dimension data to show in GA UI. But there are ways to check if the hit you sent contains the dimension or not.
On your browser, check the ga requests ( Like in chrome -> Inspect -> Network -> filter by collect). If you have included the dimension correctly, the pageview hit sent must contain cd1 parameter (1 is the index of the dimension). If the hit contains the dimension and value, then wait for few hours and your report will show the data.
You can also use Google Analytics Debigger to check the requests sent to ga by your website page
I'm trying to filter website conversions from Google Analytics for a dashboard. However since it is a mixture of third party leads, events, and page path that contribute to the leads, I have to combine different types of filters. However combining folling metrics, the https://ga-dev-tools.appspot.com/query-explorer/ shows me the value 0 even if that's not correct.
Metrics: ga:totalEvents
Dimension:ga:date
ga:pagePath=#DialogNavigatorVertical,ga:eventAction==Texting form submit
I have tried multiple solutions, but can't figure out how to get the correct data. Can I not combine pagePath and evenAction?
Thank you so much for all your kind help,
Anna
Events by definition are not page views. This means that an Event dimension (category, action, label) can't have page view metrics such as page views or average time on the page because that information does not relate to the specific event.
But you can definitely combine pagePath and evenAction. You are getting wrong results because of one of the following reasons
In your filter, ga:pagePath=#DialogNavigatorVertical is wrong, it must be either == or !=. it cant be an assignment operator
IF you wish to combine two filter conditions using AND that means both must be true, use ;. Semicolon is used for AND operator in filters
IF you wish to combine two filter conditions using OR that means both must be true, use ,. Comma is used for OR operator in filters
In case you are using core reporting api from a backend script, please URL encode the call before hitting. like == must be %3D%3D, space must be %20 and so on.
Please have a look into settings here : https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters
I am trying to use google universal analytics and its custom dimensions.
On one page, I want to send multiple values for one (and one only) dimension.
I tried:
ga('send', 'pageview', {'dimension1': 'grumpy cat'})
ga('send', 'pageview', {'dimension1': 'happy cat'})
When I use google API, I can get for my dimension1 all the values I just sent - so it works well.
However I think (I am not sure about it) that I should not send several times a pageview hit on the same page because it would disrupt the pageview metric.
So I tried to use a custom metric (pageview is a metric after all):
ga('send', 'metric1', {'dimension1': 'grumpy cat'})
ga('send', 'metric1', {'dimension1': 'happy cat'})
But this one doesn't work at all :(
It seems ga.('send'... only accepts pageview but it is weird (why specify pageview in the arguments if it is the only value possible?)
How can I solve my problem? Is it just a syntax issue, is it not possible with custom dimension / custom metric? Can I actually use pageview to do it? Should I use custom events instead of that?
Thank you!
* edit *
I actually found out that I may use an event with a label like:
ga('send', 'event', 'cat', 'view', 'grumpy')
ga('send', 'event', 'cat', 'view', 'happy')
(If anyone can confirm it or have comments I would be happy with that)
I had a similar problem a while back. The thing is, you cannot push multiple values to a single custom variable (dimension or metric) in both Google Analytics (GA) and Universal Analytics (UA). What happens when you push more than one value to a custom variable, dimension, or metric for a single page (or session or user, depending upon the scope of the custom variable, dimension or metric, if you're using UA) is that the last reported value is the only one that is recorded. The last value overrides the previously set value. So, you have tried to record two pageviews with 2 different values for your custom variable (or dimension).
In your case, say a person loads a search results page after having included two categories, grumpy cat and happy cat, and you want to record both of them in a custom variable or dimension by reporting the variable (or dimension) twice, and if you send them in the order you mentioned,
ga('send', 'pageview', {'dimension1': 'grumpy cat'});
ga('send', 'pageview', {'dimension1': 'happy cat'});
you are simply recording two different pageviews (which will skew your reports in innumerable ways, depending on the number or categories you may have). For example, if a person visits more than 5 categories, you will have duplicate pageviews, and your time on page will be drastically reduced, as according to UA (or GA) these pageviews (except for the last one) would have lasted for less than one second.
Also, any events you wanted to link to those custom variables (or dimensions), would only be linked to the last pushed pageview or custom variable (or dimension). As an example, if you had an event tracking set up to identify how many people interacted with the search results, and if you then wanted to filter by category (dimension1 in your case now), to know how many people interacted with the page when dimension1 equals grumpy cat you would get 0, as the events would have only been recorded for the pageview with ddimension1 equal to happy cat because that was the page which GA (or UA) thinks the user had been viewing when firing the event, and that page only had dimension1 set to happy cat. Since those two calls are async, you would actually never be able to know if the events were sent to the pageview you think it went to, even as I explained.
The better way to record this type of data would be to use url-encoded category names, space separated, and a space appended to the end of the list also. As an example, you must send the pageview as,
ga('send','pageview',{'dimension1':'grumpy-cat happy-cat '});
or better, as,
ga('set',{'dimension1':'grumpy-cat happy-cat '});
ga('send','pageview');
Note the space at the end also. This extra space allows you to filter any report based on the custom variable using the reg-ex <categoryName>\s. As an example, to find out how many people viewed a page with category Grumpy Cat, you will filter your report such that the dimension1 matches regex grumpy\-cat\s. I have escaped the - character in regex using \-, and \s stands for a whitespace character. The good thing is, such a report will fetch you all pageviews (or whatever you want to look at), those with only the grumpy cat as category name, as well as those pages which have grumpy cat in the categories to which a page belongs.
A way to add subcategories is to send dimensions as cat1 cat1-subcat1 cat1-subcat2 cat2 cat2-subcat1 so that the regex cat1\s will take care of all category level pages, whereas the regex cat1 will take care of all pages which have category cat1 or which have a subcategory belonging to cat1.
Hope that helps. :)
On a side note, using events for views of a page containing a category is not a nice way of recording it. Because, if you assign dimensions (and this is one of the reasons why custom dimensions were introduced, as different sites have different categories and Google can't name all), your events will also carry the dimensions of the page and it helps a lot to identify which categories are in need of what, by simply segmenting your reports by, in your case, dimension1. For example, you will get to know which category has highest SEO visits and which has the best conversion rates, and stuff. Happy analysing! :)
As it's already stated previously, you can not push multiple values at once. However, this is just an indication the approach to collect events data is not right, that is this is not a page view event anymore. My case was different, but the solution breaks down as follows:
You have multiple values to push into UA at once, say cat's features such as white, grumpy, hungry
Now, you actually realise that this is not a page view event, but rather yet another dimension - cat views/conditions/features - name it whatever you like;
You create a custom event in your GTM, called 'cat-condition';
You create a new tag in GTM collecting cats condition;
You create that custom dimension in GA and GTM, and every time you have to record cats condition you do something similar to the following (extremely simplified code sample)
['white', 'grumpy', 'hungry'].forEach(condition =>
dataLayer.push({event: 'cat-condition', condition})
)
Code snippet assumes you have GTM container configure on the page to enable dataLayer.
Finally, create a custom report in GA to deal with cat conditions. Surely, you can push more details with every single cat's condition to be able to relate it with the page details etc, but this way you have quite a flexible solution with the data being normalised right from the beginning.