On some of the websites I work on there is a facility to generate an online quote. If a visitor wants to generate a quote, they have to complete 4 steps, each with a "next" button at the bottom of the page. The URL does not change when moving on to the next step of the form so a virtual page view is sent each time a "next" button is clicked. This allowed me to set up a goal with funnel to see how visitors interact with the quote form.
This is what the piece of code I'm using currently looks like:
onClick="javascript:_gaq.push(['_trackPageview', '/Quote1']);"
I have now created a new Universal property in analytics where I'm going to set up and check my goals before upgrading the original property from the asynchronous version.
So, my question is, do I need to change this bit of code to work with Universal Analytics? Or will this work with both versions?
I'm a marketing guy and I know very little about coding so I'd really appreciate a response!
Cheers,
Andrew
Yes, you will need to the old code to the new Universal Analytics syntax, which should make a little more sense to you, marketing guy.
The updated code will look like this:
onclick="ga('send', 'pageview', '/Quote1');"
*I removed the javascript prefix from the onclick because it's redundant.
Related
I feel like this is a very dumb question, but here we go: I've set up two simple tags. Both are to track a page view – one to track if a certain page URL contains "utm_souce," and one to track if it doesn't. I previewed everything, and it's showing that the tags are working on their triggers...
My question is: where does this data go, and how do I view the results of the tracking – is it through the Google Analytics dashboard somewhere? I feel like I'm missing something, but I'm super new to GTM, so bear with me!
Thanks!
I have a Gravity Form with a text confirmation page, not a redirect confirmation. I would like to track this form through Google Tag Manager to display a goal conversion in Google Analytics (Universal Analytics).
I've followed the steps here: http://www.notesonclick.com/blog/gravity-form-event-tracking-via-tag-manager/
No conversions are being recorded. However when using GTM-debug mode, all the triggers are firing, even the gform.submit.success tag is being fired after clicking the submit button.
Could someone please help?
We've had the same issue. The only way we've been able to get GTM to record conversions is to remove validation. We'd rather it validate, but we haven't found any other workarounds.
I have implement that code in multiple site and it is working fine, Since you are not getting conversion then there might be issue with form Goal Creation in google analytics. or some time i have noticed this things happening when google analytics have been implement directly on the site and event tracking setup through tag manager..
if you still need some more help leave comment in comment box of same blog
I saw the excellent and elegant solution by Dinesh but was not able to implement it on the site I was working with. I put a hack together that work correctly. For detailed instructions, please see here.
http://www.albanyanalytics.com/2018/03/gravity-form-tracking-with-google-tag.html
I will start by saying that I have fair experience in HTML, but please keep the technical terms to a bare minimum. Pretend you're explaining it to a child. :-)
I used Wix.com to make my site (Wix is a place to easily design websites and has little HTML capabilities, since it's all based on being able to easily design a site with no HTML knowledge). You can add a Google Analytics tracking code, so i can see the number of clicks on the site, but that's about all. Apparently you can't change the code to be able to see button clicks on the site etc. (or maybe you can?...)
This is what I need above anything else:
On the site are a few "sign up now" buttons. When someone clicks it, they go to a signup page on an external site. I need to be able to track who clicks these buttons and when.
Ideally it's all tracked within google but apparently it doesn't work on wix.
Priorities:
Somehow it works with Google Analytics on Wix. It would have to be if somehow I can track it with Analytics without putting a code on the site itself. Don't know if or how that would work.
If not Google, is there a simple 3rd party Analytics site that could track the number of clicks on these buttons to external pages? It would be best if I can get the IP addresses of the clickers as well.
this is fairly easy, try customerlabs.co/google-analytics-event-tracking which can directly help you to send data about the users when they click event tracking.
eg:
Wix supports 3 types of goal tracking for your site: Destination, Duration and Pages/Screens per session. Currently, Wix doesn't support an Event tracking goal.
I am trying to find a clear method of tracking clicks to external sites from a site I have built, it appears a lot of information available on this is contradictory or incomplete. I have found autotrack.js on Github which looks like a simpler method, so my question is three-fold, I'll make the question super clear so there is a super clear answer for others in the same conundrum as me.
What snippet/script is added to the HTML and where? I currently have the standard GA snippet for tracking page loads before the </body> tag.
Should I amend / edit the <a> tags to make sense of the who clicked what? I.e. name them, can this be avoided or automated, what I mean is there a script smart enough to name it the same as the destination, like reallygoodlist.com or fb.com/reallygoodlist ?
Is there any GA work required? Set up Goals etc, ideally I would be looking to avoid this - I have a lot of links.
Here is my site (if it helps):
http://www.reallygoodlist.com
1) What snippet/script is added to the HTML and where? I currently have the standard GA snippet for tracking page loads before the tag.
The installation and usage section of the autotrack documentation shows how to install autotrack, so I'll just link to it rather than repeating.
If you're just using the default GA tag, you can probably copy/paste most of the code there, changing the parts relevant to you: e.g. if you only care about outbound link tracking, then only include the outboundLinkTracker plugin.
It also looks like you're installing code via npm, so in this case you can link autotrack's source file in the node_modules directory as you've done with the Babel polyfill.
<script src="node_modules/autotrack/autotrack.js"></script>
2) Should I amend / edit the tags to make sense of the who clicked what ? i.e. name them, can this be avoided or automated, what i mean is ether a script smart enough to name it the same as the destination, like reallygoodlist.com or fb.com/reallygoodlist ?
Autotrack's outboundLinkTracker plugin automatically sets the link's URL as the event label, so you probably don't need to do anything unless that's not enough.
If you want more control than that, setting one of the common options will allow you to custom any data that is sent to GA.
3) Is there any GA work required? Set up Goals etc, ideally I would be looking to avoid this - I have a lot of links.
Not for outbound link tracking. It's just tracking the data as events, so you'll be able to find them in your event reports in GA.
I have this code setup to track image downloads throught Google Analytics.
<a href="/media/37768/CC20100117m001_thumb_2000.jpg"
onclick="pageTracker._trackEvent('Image', 'Download', 'file.jpg');"
class="hi-res track">
Hi-Res</a>
But the events don't ever show up in the GA reports.
I thought maybe the the browser was following the link before the javascript was being run but setting href="#" doesn't work either.
Any ideas?
Your browser may be following the link before Analytics can make the call logging the event. Check out this page for Google's solution:
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527
I don't know what your error is but to find out what it is you can:
Install firefox
Click on the link
Go to Tools | Error Console
Look at the error
This doesn't look correct to me--for one thing, you're using 'pageTracker' to call _trackEvent. In fact, _trackEvent is called by an 'event tracker' object, which is instantiated with _createEventTracker.
There are a couple more steps you haven't mentioned so et's go through them all. (There could be more than one correct way to do this--i'm not sure. So what i can do is compare your code with the steps i follow every time i set up Event Tracking, and which so far, have worked every time.)
Enable 'Event Tracking'. (Do this in
your profile.)
Create the 'event tracker' instance and insert it just after the last line of the pageTracker script. This is usually a single line of code that in your case would look something like this:
var ImageTracker = pageTracker._createEventTracker("Image")
Set up the call to the _trackEvent()
method in your html. I think all you
need to do here is replace
'pageTracker' in your code with 'ImageTracker' (the
event tracker instance you created
in step 2 above).
I faced a lot of problem then I realize it's easy steps and want to share with everyone.
First change your script code, link is https://developers.google.com/analytics/devguides/collection/gajs/#quickstart
Second add a button like this.
<>button onclick="_gaq.push(['_trackEvent', 'button3', 'clicked'])">Press<>/button>
Enjoy :)