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 Automated Reporting
HI all, I tend to do a big reporting powerpoint deck using screenshots from google analytics and tables I create year end and mid year. It's like an 80 page report for the 10 webisite swe have and then I go ahead and make annotations as I see from the data. That being said this can take a lot of time, up to a 40 hours of time to pull it all together or more which is challenging when you have daily meetings. Anyhow, I've looked into automating and tried a couple things: 1. Tableau- but it keeps crashing and seems tedious 2. Dashlane and supergrabber- seem a bit tedious to set up too. Anyone have ideas on how to better shar ereporting in the organization in this type of format for a website (websites)? Organic, paid, traffic, etc. Laura
Reporting & Analytics | | lauramrobinson322 -
E-commerce data import Google Analytics
Hi there, Since a few weeks we have started a cooperation with a big online wholesale company which now sells our products. I want to import simple E-commerce data: amount of transactions and revenue. More detailed data such as amount of products, name of products, etc. is not necessary in the first place. Now I discovered the 'data import' functionality in Google Analytics but I can't find any suitable option for E-commerce data import. The data from the wholesale company is gathered in a nice export in a separate system, so there should be a way ti import this data into Analytics. Could anybody help me with this? Any advice is welcome! Thanks in advance.
Reporting & Analytics | | MarcelMoz
Marcel0 -
Does Google encryption of keyword data impact SEO revenue reporting in Google analytics?
Hi there, I know Google has been encrypting SEO keyword data which they rolled out in September 2013. My question is - will this impact SEO revenue figures reported in Google analytics? I have been monitoring SEO revenue figures for a client and they are significantly down even though rankings have not lowered. Is this because of Google's encryption? Could there be another reason? Many thanks!
Reporting & Analytics | | CayenneRed890 -
Do target underscore blank links adversely effect Google analytics
Good morning from 17 degrees C about to rain again wetherby UK... On this page http://business.leedscityregion.gov.uk/invest/sectors/ there are a number of links that pop open new windows despite being internal links 😞 My question is please... "If an internal link to a site is set to _blank and pops open a new window are there any detrimental affects to google analytics tracking e.g. increased exits etc" Any insights welcome 🙂
Reporting & Analytics | | Nightwing0 -
SEOMoz crawls skewing Avg Visit Duration in Google Analytics
Hello, We are a UK based company. Our Google Analytics account is showing a rise in Avg Visit Duration for 'Direct traffic' since we started using SEOMoz. Are any other users experiencing this issue? We tracked it down to City Seattle, and when doing an Advanced filter by removing Seattle, the results are normal again. What does SEOMoz or other users recommend we do besides continuously using advanced filters? We have enquired about excluding Roger's IP address, but have been told that Roger uses the Amazon cloud, so the IP is not static. See attachment for screenshot of our Google Analytics account of Avg Visit Duration since we began with SEOMoz. Rich Talbot 718g3.gif
Reporting & Analytics | | STL1 -
Analytics/Google Keyword comparison
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. However, 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. Also, I'm having problems getting my kids to eat their greens, any advice! 😉 Thanks Neil
Reporting & Analytics | | mccormackmorrison0 -
Google Analytics: Difference Between Goal Conversions & Goal Completions
When using Google Analytics, what is the difference between total goal conversions and total goal completions? We have many goals set up in a lead generation environment. Therefore, the only element of conversion is submitted a lead and arriving on the "Thank You" page. THose thank you pages are tagged accordingly. When we run reports though, the number of "Total Goal Conversions" and "Total Goal Completions" never match up.
Reporting & Analytics | | eMagineSEO0 -
Google Analytics - paid & unpaid visits messed up
I guess Google Analytics messes up my paid and unpaid visits. In the list of top 10 kw's sending non-paid traffic it shows 5 very short kw's that we don't rank for at all (checked with RankTracker - we are not in first 50 search results). But these are the kw's we advertise for... One more proof: Webmaster Tools 'Search queries' shows 10 times less 'Clicks' from organic search than Google Analytics. Is there anyone who is experiencing this kind of problems with GA? Is there anything you can do with it?
Reporting & Analytics | | Alexey_mindvalley0