Tag Info

New answers tagged

2

Custom segments are what you need if you want to put people into specific buckets based on some condition. Go to Segments -> New Segment -> Advanced -> Conditions -> then choose Pageviews. Then on your right you can see logical operator for combining more conditions. Remember to choose "Include" (because you want to include, not exclude, people based on ...


1

Try the Wayback Machine http://archive.org/web/, you can even take snapshots of the page when you want.


1

User ID enables the analysis of groups of sessions, across devices, using a unique, persistent, and non-personally identifiable ID string representing a user. That being said when you add ga('create', 'UA-XXXX-Y', { 'userId': 'USER_ID' }); to your tracking code Google Analytics uses the information in the background to help aggregate the data. ...


0

Your script is running before the GTM's dataLayer object is ready as it's retrieved asynchronously. This means you need to wait the load event is fired/triggered. Your server side php code is not good as is writing into the dataLayer and definitely is the root issue this code is not awaiting for the GTM's datalayer object. Instead of this just create a ...


1

Updated Answer Since you are wanting to actually report on the User ID you will need to set up a Custom Dimension to store it. After looking at About User Data and Tutorial: How to send user IDs to Google Analytics I believe that will be the best solution. In essence the same User ID that you are storing in the User ID field will also need to go to the ...


2

There doesn't seem to be an easy function built into analytics.js that I have found, however, there is this code for sending the same data via an XHR request to your server. ga('create', 'UA-XXXXX-Y', 'auto'); ga(function(tracker) { // Grab a reference to the default sendHitTask function. var originalSendHitTask = tracker.get('sendHitTask'); // ...


0

Use a server-side scripting language. Create this PHP script: <?php $handle=fopen("301tracking.log","a+"); fwrite($handle,"1 guest from IP".$_SERVER['REMOTE_ADDR']."arrived at ".time()."\n"); fclose($handle); $newhost="http://domainB.com"; $url=$newhost.$_SERVER['REQUEST_URI']; header("HTTP/1.1 301 Moved Permanently",true); header("Location: ...


0

You wont actually be able to log this with Google analytics. This would require that the page is loaded before it is redirected. You could try using meta refresh tags on these pages and place your tracking code before the refresh tag. Alternately, parse your server logs with something like AWstats http://www.awstats.org/ Your .htaccess is instructing the ...


1

If you can't modify your .htaccess, or you just want to do that for only some views, you can apply Search&Replace filter in your Google Analytics view like this: Obviously, instead of "something" you put the target medium of that campaign. You can do the same for source and other utm parameters. You need to just create another filter and choose the ...


0

You should also consider server side statistics to gather data like accesses to files. You can install a system on your server which will analyse the server log files. For example Webalizer http://www.webalizer.org/


1

I believe that a better way to track PDF’s, and other file downloads, is to create a mechanism to take advantage of the Google Analytics Measurement Protocol. It would allow you to track when the file was actually accessed from your server instead of when a button\link was clicked. The con of this approach is of course creating the mechanism to handle the ...



Top 50 recent answers are included