Google Analytics: Tracking multiple URLs as single page - google-analytics

I run a website where the user is able to create a bespoke page from a template, which is published with a custom URL. For example:
http://example.com/customer-bespoke-url-1
http://example.com/customer-bespoke-url-2
http://example.com/customer-bespoke-url-3
Each of these URLs serve a templated page with custom content, depending upon the URL, but the overall design and layout is the same.
I would like to have the option to track traffic on these pages as a single entity within Google Analytics i.e. combine all the data for these pages together when I need to view the overall effectiveness of the page.
Is there a way I can mark these pages to achieve this?

Related

How do I integrate two separate Google Analytics accounts such that one account tracks a subpage of the main page that the other account tracks?

Another person has a google analytics watch on a page and all the first level subpages, however the page I want to track is a subpage of a subpage (second level). How do I apply my tracking code to collect information on the page I want without interfering with the other account's data collection? Working in drupal 7.
You should be able to add multiple instances of analytics.js GA tracking code:
https://support.google.com/analytics/answer/1032400?hl=en
You can create static blocks out of GA embeds and use block properties to set on what page what block should appear or use some advanced module, like context to fine tune appearing of that block.
Or you can place the code into html template directly and use good old (and ugly) if condition to show embed code only to some pages.

Google Analytics - Some weird URLs are being registered in behavior reports

We made a google analytics account for one of our clients as part of the requirements.
Under Reporting tab, we have sections like Behavior -> Site Content -> All pages. In All Pages section we are able to see a table which contains all the urls which are viewed with respective pageviews , unique pageviews and other dimensions.
A normal page view looks like:"/pwsportal/faces/homePageNav/mktplan_adf.Ctrl_9_afrLoop_1234423".
Some how there are some weird page urls like :
I tried using Exclude Filters and couldn't eliminate these kind of urls.
From one on the blog i got to know that if any url contains any script tags it is a part of hacking technique called cross site scripting.
Finally i am here to find a solution to eliminate the these kind of existing urls and to prevent them from getting registered in future into google analytics.

How to get a Tag in Google Tag Manager to trigger on Drupal generated pages only

I have a website that contains drupal CMS and a lot of other floating/landing page that are not generated by Drupal.
All the pages are sharing the same Google Tag Manager container.
Recently there is a new tag that only needs to trigger on Drupal pages only.
How can this be achieved?
There are multiple ways you can do this but you need to understand the general concept first before deciding on the exact route to take.
Find a unique way to identify your Drupal page and/or your non-Drupal pages
Create a trigger in GTM that can detect this unique property
Fire your tag using this trigger
So, what are the ways to find uniqueness between your Drupal and non-Drupal? Here's a few suggestions:
persistent URL structure (e.g. are your landing pages on a sub domain?)
Unique HTML element on every drupal or landing page
Unique class on every drupal or landing page
Unique javascript variable populated on drupal or landing pages

Duplicate domain tracking on Google Analytics issue

We've accidentally placed the same Google Analytics tracking code on two different domains.
www.y.com
www.x.com
We've rectified the issue now but retrospectively, is there any way to filter that data going to the specific domain name www.x.com for example?
Note: this is not a duplicate of Google Analytics: Track two domains as one
You could add a filter to the view (profile) in question. That will remove the data that you don't want. Another option if you don't want to loose the data in the view would be to create a custom segment that you could use when ever you want to split the data out.
Update from Google+
You can search with regex
^/app/
in the small search bar (custom segment) in your page reports (e.g. Behavior -> Site Content -> All Pages), after which you can look at the aggregate metrics for all pages which start with /app/ (i.e. all the pages with different parameters).
If all the /app/.* have the same page title, you can look at the Behavior > Overview report, but choose Page Title as the dimension.

managing redirection with google analytics

I have a site that contains the file
redirect.php?id=123
It redirects folks to another site using an id it pulls from the database.
I'd like to track the page on Google Analytics, see where users are coming from, and what popular sites they're going to.. etc.
I currently set up the page so that it pulls (with PHP) the link from the database, and outputs the ga.js stuff and a javascript redirect.
The issue is that I'm getting the data on my analytics dashboard as if every id is a different page..
What is a better way to do this?
If you want to check for pages of the type redirect.php?id=x then the page Carlos links to is how you would do it.
You would want to exclude the id parameter from your search. Then Analytics would combine all the redirect.php?id=1 redirect.php?id=2 redirect.php?id=3 pages as just a single page named redirect.php
How do I exclude query parameters from my reports?

Resources