How to trigger a pageview using Google Analytics API upon form submission
-
I need to set up a goal using the G A API to trigger a pageview when someone submits a lead on my site. There's no "thank you"page currently. How do I go about it? There's no "thank you"page currently. How do I go about it? I have never used the API but am very familiar with analytics. Thanks!
-
OK, and where do i place the Javascript snippet? On a specific page on the site? Sorry, and Thank you, I am just a simple marketer
-
You would trigger this with JS at the time that your form is successfully submitted.
-
Thanks Martijn, where do I place the javascript unless I use the API?
-
Well using their API seems a bit to much overkill. But what you could do is a virtual pageview via JavaScript. Instead of doing the normal: ga('send', pageview'); you can do: ga('send', 'pageview', '/goal-thank-you'); then that url structure can be used in the settings of a goal in GA.
-
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Google analytics suddenly stopped tracking all my landing pages
Hey guys. I love the new update of GA. Looks so clean. So, of course, I was excited to see how my landing pages were doing. I went to behavior, all content, all pages. And I noticed it's only showing me 19 pages out of the 93 I have indexed. And none of the top ones at all! Can't find them anywhere in GA! Anyone seen this before? Thank you so much
Reporting & Analytics | | Meier0 -
What does 'Safari (in-app)' mean in Google Analytics browser traffic?
Hi, can anyone explain what 'Safari (in-app)' refers to in my browser sources? Also, it has a very high bounce rate - any ideas why?
Reporting & Analytics | | b4cab1 -
Google Analytics goals only show unique event triggers
I have some goals in GA which is linked to different event triggers. However I've found out that the goal is only showing the unique event triggers and not the total. I need it to show the total in order to be accurate. Is there any way to switch that option? I can't find any options like that in GA or guides to do so.
Reporting & Analytics | | WebGain0 -
How does Google Maps/G+ traffic show up in Analytics?
Hi Moz Community, I've been trying to figure out how traffic from Google Maps (and G+) shows up in Google Analytics and am struggling to find a good answer online. If someone finds a business through Google Maps and then clicks on the website in the Maps listing, does that show up as a referral from Google Maps? Our site shows virtually zero traffic from Google Maps even though we have a number of listing. Two related questions: if someone clicks through to a G+ page from a Maps result and then visits our website from the G+ page, does that show up in Analytics as a referral from G+? Is traffic from Google Maps or G+ ALSO counted as organic traffic? (Would it be possible to accidentally double-count a visit as both organic and a referral from Maps/G+? Thanks everybody!
Reporting & Analytics | | JohnGroves0 -
Anyone heard of or used Hadoop software for SEO/website analytics?
Hey Moz Community, We received an interesting email this morning from a client's marketing manager asking if we knew about or have ever used "Hadoop software" because "[Business owner name] says it’s supposed to help us see how people use our website and more." I've never heard of this software and upon looking around on the web, it says it can do a lot, but my client is a small law firm who average 800-1,000 visitors per month, mainly from their 2 local office cities/markets. Anyone have any thoughts on this or ever use this software? Thanks in advance. Patrick
Reporting & Analytics | | WhiteboardCreations0 -
Google analytics vs Webmaster tools data
Hi Which is more accurate WT or GA data ? Since GA reporting a KW (thats very recently fallen from page 1 to 3 hence looking into data to find the cause) in the Organic part of Search tab as having generated just 1 visitor over a month (hence presuming fall could be due to low visits from a page 1 result) whilst under Search Engine Optimisation tab (data sourced from WT i think) its reporting 5 click thrus from 150 impressions over same period resulting in a quite good 3.33% CTR (hence wouldn't expect to be the cause of a fall) and what i would have thought GA would report as 5 visits instead of the 1 they do report !? The reason im looking for answer in the data is because no on-page has changed and still scoring a grade A and off page metrics have all improved across the board (apart from small drop in majseo's Trust Flow) such as increased links, RD, Citation Flow, Ref Subnets etc etc etc Cheers Dan
Reporting & Analytics | | Dan-Lawrence0 -
Advanced segements Google Analytics
Hi guys, I was to hasty last time marking the given question as answered. So i would like to ask another question on the subject. My original question was how to get a pdf report of 10 specific keywords with information about visits,pages per view. avg, visit time, new visitors and bounce rate. The answer was to create an advanced segment with "or operators" and adding all keywords on an exact match basis. I did this but it still gives me a list of more then 500 keywords in traffic sources organic view. Next to that i get different visitor numbers for some keywords where it says 40 at the normal segments (all visits) but gives me 0 when i turn on the advanced segment. I've been clicking and changing things for a long time until i got almost dizzy. Could someone plz help?
Reporting & Analytics | | 5MMedia0 -
Google Keyword Tool versus Google Analytics
Hi I'm trying to establish a methodology to best show the gap between potential and realised organic keyword traffic. To obtain potential keyword traffic I'm using the Google Adwords keyword tool to derive local monthly search volumes for exact keyword matches. To get the realised data I'm using Google Analytics. However, to get the I'm confused as to which is the best way of getting a comparable metric from Google Analytics (GA). I was using custom reports and the 'organic searches' metric. However, this provides different values to a standard report selecting non-paid search in the default advanced segments. What is the best report/metric in GA to use for both organic and paid search volumes that would be comparable to the Google Adwords keyword tool. Thanks Neil
Reporting & Analytics | | mccormackmorrison0