cfpb / regulations-site

(DEPRECATED) Web interface for viewing U.S. federal regulations and other regulatory information
Other
28 stars 43 forks source link

Analytics Tracking Issue #665

Closed bethannenc closed 9 years ago

bethannenc commented 10 years ago

Hi -

We realized today that the tracking code that is being sent to the CFPB wide analytics account is not working from the /eregulations pages. The reason for this is that the tracking code is sending a universal tag to our account, however, our account has not been migrated to universal. All tags sending data to the CFPB wide account should be using the classic code.

Our basic pageview tracking:

script type="text/javascript"

var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-20466645-3']); _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

Please insert classic tracking code into all pages of eregulations. Thank you!

khandelwal commented 10 years ago

@bethannenc Can you indicate the severity of this? Should we drop everything and work on this right now? @theresaanna What level of effort will it take to do this?

bethannenc commented 10 years ago

On a scale from 1 - 10, I'd label this a 7 for two reasons:

1) Left broken, it will continue to contaminate the rest of CFPB's data. (New users, returning users, etc...). 2) We've been asked to start pulling monthly data on eregs, including source traffic (which you can't get if they come through another page on CFPB, even if we use the current universal account).

jpyuda commented 10 years ago

While you're looking at this, should eRegs (and, likely, all of consumerfinance.gov) use the government-wide digital analytics program code?

cmc333333 commented 10 years ago

@jpyuda's trolling

cmc333333 commented 10 years ago

@bethannenc: If you take a look at the source code for one of the live pages, e.g. http://www.consumerfinance.gov/eregulations/, you'll see that we're attempting to send the tracking information to two IDs. We need this split so that custom events, etc. go to something RMR can track (and so we can tune the site as we learn about our clientele).

Are you receiving no eregs data at your analytics code? I thought that issue was resolved several months ago.

bethannenc commented 10 years ago

There shouldn't be two accounts. There should be one account that is tracking CFPB's analytics including any custom code that is created for events.

Nevertheless, the tracking code that is being sent to the CFPB site-wide account is not working. It was working back in November when we fixed the issue, but it appears that since December, nothing has been coming through. I'm not sure if this is because Google made a change so that Universal code is not compatible with classic accounts or if something has just been broken.

The reason this is coming up now is because the Regulations team has requested that we start providing reports for them on e-regs.

bethannenc commented 10 years ago

@jpyuda Yea - I've heard that GSA was doing this. I would be really open to learning more. Are other agencies using the tool and just doing double tracking? I could see a lot of value in tracking patterns across the agencies.

cmc333333 commented 10 years ago

@bethannenc: We had an issue where the GA code wasn't initialized at all for some time, but that was fixed recently (#657) -- would you mind confirming that there's been no hits since ~ mid May?

bethannenc commented 10 years ago

@cmc333333 Since mid-May, there have been about 3 hits a day - most likely related to a sampling error and not because GA was actually receiving data.

ascott1 commented 9 years ago

This isn't an issue any longer.