Google Analytics - Match URLs on Unique Number in Content Drilldown Using RegEx? - regex

I am trying to track pageviews on Google Analytics for knowledge base articles (on Zendesk).
Each article has a unique number. However, the title of the page is sometimes appended to the URL, and GA tracks this as a separate page. If the title of the article changes, it generates a new URL.
For example, these would all be the same article, so I want to see a single pageviews count, but GA would show as 3 separate stats
/hc/en-us/articles/360039413394
/hc/en-us/articles/360039413394-How-To-Make-A-Sandwich
/hc/en-us/articles/360039413394-How-To-Make-A-Turkey-Sandwich
I want GA to roll up the articles matching on the unique number, and ignoring everything after that. Is there a built-in way to do this? Is there a way to do this with Regex? Where would I add the Regex for the Content Drilldown page? Help!
Thank you.

Analytics cannot know in an integrated way which part of the URL interests you or which distinguishes one page from another.
What you should do is understand when in your system the page title is appended to the URL and avoid it.
For future data you can try to clean the data with a regex before it arrives in Analytics, for example with GTM, but this could compromise the other URL cases that need to be handled differently.
In general, if in the Analytics reports you filter the URLs for an identifier, for example 360039413394, in the first row of the report you can see the aggregated values of all the URLs that contain that string. So if you need to verify a particular product page you can use this workaround when viewing data.

Related

Google Analytics - Grouping URL according to query paramters

I am running a campaign and all partner traffic going through a landing page.
However, this page url is dynamic according to various parameters... so my GA reports show hundreds of lines.
I know I can filter the parameters out... but I would like to extract the data per partner.
Here is an example of the dynamic urls :
/landing-page/?ref=partner01&id=value1&email=value2&param=value3
I want to clean the urls but leaving the first parameter "ref" in the report.
I tried ref=([^&]*) but it is not working.
Then GA should group urls (I guess) and I can see a report with data sorted per partner.
you may use 'Exclude URL Query Parameters' in a view settings and put there a list of all the unwanted parameters like id,email,param
Having ref out of the list will keep it in page path.
More on Help pages

Isolating product pages in Google Analytics with regex

I'm setting up Content Groups in Google Analytics from the following logic:
Front page
Section pages
Category pages
Subcategory pages
Product pages
Checkout flow
I've done the top levels like this: ^/sektion-1/kategori-1$|^/sektion-2/kategori2$.
But I don't know about the product pages. there is nothing in the page title or the URL the identifies the product pages. Product pages are always level 3 in the URL, but they are not the ONLY pages on level 3.
So, how can I isolate those without having to include regex for each and every one of them? (there are 10.000+ product pages)
Since there are many product pages without matching URL. I would recommend setting up content group by tracking code.
Add this code to all product pages ga('set', 'contentGroup1', ‘Product Pages');
This method is simple and more fool proof then regex.
hope this help
Analytics ML

Best way to track campaign transactions in Google Analytics

We have just begun trying two price comparison websites that are using different source, medium and campaign values in Google Analytics.
I want to try to track sales from these to the product and notice that in Analytic Goals they are fine for setting up a goal that would end in our transaction confirmation url but need to have a funnel url that ends with, for example below
utm_source=pricerunner&utm_medium=cpc&utm_campaign=pricerunner
Anybody have any idea how to do this using the end of a url? All I can see if GA is the entire url value or "begins wih"
I have tried using regex but nothing is being tracked
The campaign parameters needs to be passed in the url from the price comparison website to landing page (probably a product page at your end). At that point the GA session gets automatically associated with the utm parameters, and you do not track those url parameters subsequently in your funnel.
If you want to see the funnel for a specific pricce comparison website you can use a GA segment to isolate the goal traffic based on the campaign name. that should do the trick

Google Analytics in footer file

I have a question about how Google Analytics tracks pages in a Wordpress site or any other site that uses a template file to include the code for Google Analytics in the footer or header. Since the file is generated and used in all the pages, that would mean that the analytics code is counting all the pages that are viewed correct? Also, is it possible to view what pages are getting hits and have a more detailed report in Google Analytics? I just have a feeling that the page i'm tracking is displaying inaccurate reports since the same code is used on every page. Can anyone help clear this up and educate me a bit on this topic?
The code is always the same, it loads in the footer so you dont have to put it on every single page.
in the code there is a unique code for your website so analytics knows wich analytics account needs to get the information.
The code dosn't need to be changed everypage.
You can see the pageviews like this:
-->google analytics
--->contents
-->Site content
-->all pages
Now you get a list with urls and the page view for every url
You can sort the list by pageviews (how many times is the page loaded) and unique page views(How many uniqe ip addresses have visited the page.).
You can also find bounce rate wich shows how many % of the users left you site on that page.

Encoding key-value pairs in an RSS feed's URL

I've noticed that most websites don't set up their RSS feed URLs to make use of encoded key-value pairs that let one create specific queries, like the following fictional example:
http://stackoverflow.com/feeds?tag=python&lang=en&minvotes=2
Is there a particular technical reason for this? Or am I just not finding the RSS feeds that do this?
There is no technical reason. My company does this now with our news feeds.
I'd post a link, but it requires registration to see the feeds. We have urls like .../feed.php?type=news, etc.