[MGNLGA-9] Update Google Analytics tracking code Created: 25/Apr/13 Updated: 30/Apr/13 Resolved: 29/Apr/13 |
|
| Status: | Closed |
| Project: | Magnolia Google Analytics |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.1.3 |
| Type: | Task | Priority: | Major |
| Reporter: | Ben Price | Assignee: | Tomáš Gregovský |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoR: |
Empty
|
| Date of First Response: |
| Description |
|
Google have made changes to Analytics and we need to update our tracking code. New code which needs to replace old code here, also attached. <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-xxxxx-y']); _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> with the bold text in the example below: <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-xxxxx-y']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> Details from google here: https://support.google.com/analytics/answer/2444872?hl=en |
| Comments |
| Comment by Tomáš Gregovský [ 29/Apr/13 ] |
|
we need to change two row in /templating-kit/js/ga/jquery-gatracker.js it is part of google-analytics module 334: var gaUrl = (location.href.indexOf('https') == 0 ? 'https://ssl' : 'http://www'); to this: 334: var gaUrl = (location.href.indexOf('https') == 0 ? 'https://' : 'http://'); |
| Comment by Tomáš Gregovský [ 29/Apr/13 ] |
|
changes commited |