If you use Angelfish Software v2.4+, please use the new Help Center:
https://help.angelfishstats.com/helpdesk/?aa=200
Google Analytics tracking code allows you to store a backup copy of the data Google collects. The backup copy can either be sent to your local web server or to a remote server. Once you have this data, you can process it in Angelfish with the UGA tracking method.
To make this work, you need to add a few lines of JavaScript to your existing Google Analytics tracking code snippet. Setup instructions are below.
NEW TO ANGELFISH?
Angelfish is secure, on-premises web analytics software. Learn more here:
https://analytics.angelfishstats.com/
Benefits of using Angelfish with GA
GA Backup
Thanks to agency & employee turnover, organizations lose access to Google Analytics with stunning regularity. If you can't access your Google Analytics account, Angelfish will have a "backup" of your data.
Full Visitor Details
Google Analytics doesn't show individual visitor details, but Angelfish does! Angelfish lets you drill down to see full clickpaths, usernames, IP addresses, geographic location, and other details for every visitor to your website.
Extra Information
Angelfish provides information that doesn't exist in Google Analytics, like Bandwidth reports, 404 Pages, and Direct File Downloads.
SETUP INSTRUCTIONS FOR UNIVERSAL ANALYTICS WEBSITES (analytics.js):
If you have any questions about getting this working, please contact our support team - we're happy to help.
We're going to use the task functions in analytics.js to create a request for __ua.gif, which can either be sent to the local web server or to a remote web server.
- Ensure your web server uses the NCSA (apache) or W3C (IIS) logging format.
- Add __ua.gif to the root directory of your website(s) - you can copy the file by clicking this link: __ua.gif
- From either of the below examples, copy the code between the //START and //END comments and paste it between the "ga('create'[...]" and "ga('send', [...]" lines of the GA tracking code snippet.
Example 1 - Data Sent to Local Server:
// This example shows what your GA code will look like, once you add the Angelfish section to the default code.
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXX-YY', 'auto');
// START local backup of GA data request for Angelfish
ga(function(tracker) {
var originalSendHitTask = tracker.get('sendHitTask');
tracker.set('sendHitTask', function(model) {
var payLoad = model.get('hitPayload');
originalSendHitTask(model);
var gifRequest = document.createElement("img"); // Send __ua.gif to the local server
var gifPath = "/__ua.gif";
gifRequest.src = gifPath + '?' + payLoad;
});
}); // END local backup of GA data request for Angelfish
ga('send', 'pageview');
</script>
Example 2 - Data Sent to Remote Server:
// This example shows what your GA code will look like, once you add the Angelfish section to the default code.
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXX-YY', 'auto');
// START remote backup of GA data request for Angelfish
ga(function(tracker) {
var originalSendHitTask = tracker.get('sendHitTask');
tracker.set('sendHitTask', function(model) {
var payLoad = model.get('hitPayload');
originalSendHitTask(model);
var gifRequest = new document.createElement("img"); // Send __ua.gif to a remote server
var gifPath = "https://www.your-domain.com/__ua.gif";
gifRequest.src = gifPath + '?' + payLoad;
});
}); // END remote backup of GA data request for Angelfish
ga('send', 'pageview');
</script>
Notes:
- During processing, Angelfish looks for a file called __ua.gif (i.e. don't change the name!)
- If using a remote server, edit the value of the "var gifPath" variable with the correct domain or IP address.
- if using a remote server, we recommend using https as the protocol. But if your site doesn't use SSL, http is fine.
SETUP INSTRUCTIONS FOR TRADITIONAL WEBSITES (ga.js):
If you have questions about setup, please contact our support team - we're happy to help.
- Add the cookie field to your web server's log format. (IIS Instructions) - (Apache Instructions)
- Add __utm.gif to the root directory of your website(s) - you can copy the file by clicking this link:__utm.gif
- Reference the _setLocalRemoteServerMode method in the your existing ga.js code snippet.
Sample Code: (use your own UA number, not XXXXX-X)
<script type="text/javascript"> var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_setLocalRemoteServerMode']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})(); </script>
0 Comments