Tracking Goals on a Subdomain?
-
What needs to be done to Analytics to track goal completions on a subdomain?
The main Analytics profile is set up for example.com, but landing pages for paid campaigns are set up at sub.example.com. Thank-you page is sub.example.com/thank-you.php
What needs to be modified in Analytics (or to the Analytics code) or how do the goals need to be set up to track these subdomain conversions all within the same Analytics profile? They're not tracking currently.
Thanks.
-
That seems to be working. I'll test it for a week and see what happens.
I tried that at some point, because that's also what I thought it should be, but it didn't work. Not sure what made the difference.
Thank you.
-
Oh, for your destination, if your profile is using relative URLs (/thankyou.html) you don't need to include the http://sub.example.com in your match, and if you did this may have been why it was not reporting data.
-
Ok, well in that case you don't want event tracking, you can just set visits to that page as a goal and get some even better reports.
Go to admin -> goals (right column) -> create goal -> type: destination
For goal details, just set the destination as regular expression match with this in the field:
/thank-you.php
This regex will match the destination page whether or not it is on a subdomain. You can also assign a value (usually the average conversion amount from transactions leading to that page) or throw in funnel steps if you'd like.
Hope this helps,
Chris Wilson
-
This is how they have it set up:
That's being used on both the domain and subdomains,
The goal in Analytics is set to track when people reach http://sub.example.com/thank-you.php, but it's not tracking.
-
What is your event tracking code and profile tracking code for the subdomain? I personally separate out subdomains into UA-xxxxxxx-2 and so on, but event tracking should still work if you have everything lumped into one subprofile.
Example profile tracking code:
Example event tracking code:
onClick="ga('send', 'event', 'Share', 'Facebook', 'Homepage Stat');"
or
onclick="_gaq.push(['_trackEvent', 'Donate', 'Click']);"
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
-
Change Phone Number Based on Traffic Source + Ping URL for Call Tracking Number
Hi Everyone, Is there a tool that can change the phone number on a web page based on the visitor source (i.e., direct, organic, paid, etc.)? I'd like to implement a solution like this with different call tracking numbers based on the visitor source. We use the Google suite for our analytics (GA, GTM, Google Data Studio, Google Optimize is also an option as well). - Also, is there a good call tracking service that will ping a URL each time the phone number is called so that we can track these calls as events in GA? The majority of our visitors use a desktop PC and dial in the number on the screen rather than clicking (tapping) on it from a mobile device. Thanks, Andy
Reporting & Analytics | | AndyRCWRCM0 -
If website users don't accept GDPR cookie consent, does that prevent GA-GTM from tracking pageviews and any traffic from that user that would cause significant traffic decreases?
I've been doing a lot research on GDPR impact and implementation with GTM-GA for clients, but it's been 12 months since GDPR has gone live I haven't found anything on how GA traffic has been impacted if users don't accept cookie consent. However, I'm personally seeing GA accounts taking huge losses in traffic since implementing GDPR cookie solutions (because GTM/GA tags aren't firing until cookies are accepted). Is it common for websites to see significant decreases in traffic due to too many users not accepting cookie consent? Are there alternative solutions to avoid traffic loss like that and still maintain GDPR compliance? It seems to me that the industry underestimated how many people won't accept cookie consent. Most of the documentation and articles around GDPR's start (May 2018) didn't foresee or cover that aspect properly, everything seems to be technically focused with the assumption that if implemented properly most people would accept cookie consent, but I'm personally not seeing that trend and it's destroying GA data (lost traffic, minimal source attribution, inaccurate behavior data, etc). Thanks.
Reporting & Analytics | | Kickboard2 -
GA: How do I preserve custom dimension across domain and subdomain?
Using custom dimensions our site tracks logged-in vs not logged-in users on our shop site (shop.example.com). A user can only login on the shop.example.com. The problem is when the logged in user visits our the main domain (example.com), we lose the custom dimension and the user becomes anonymous. At this point, if the user goes back to shop.example.com, the logged-in custom dimension comes back. How do I preserve the logged-in user dimension across the main domain? Example of snippet:
Reporting & Analytics | | Evan340 -
Tracking Organic Traffic and Conversions from multiple TLDs with Google Tag Manager
Hello Guys, I want to track traffic / conversions from different domains (basically same brand - but a lot of different TLD's). The "problem" is that the main conversion which I want to track always happens on the .com TLD and all other TLD's link to there. The problem is, that now the traffic always counts as Referral Traffic, even after setting up cross domain tracking over the google tag manager... So example: Sessions begins on example.co.uk/landing-page11 after User searched on it on google. He decides to buy the product and therefore moves to example.com for the checkout process. No I will have the conversion in my google analytics under referral with example.co.uk. --> but I want to have it under organic, and not under referral. How I can manage this? Thanks for you Help!
Reporting & Analytics | | _Heiko_0 -
Google Analytics Event Tracking
Hi Guys, I want to set up a goal in Google analytics for this site http://www.dfrsolicitors.co.uk/contact.php and the contact us form is in php (so there is no thank you html page). I know there is a piece of code "onsubmit" or whatever it is, but I can't find it. I want to be able to track successful submissions. Kind Regards Neil
Reporting & Analytics | | nezona0 -
Universal Analytics Tracking code for Measuring Addition/Removal from Cart via GTM
Hello Experts, Can you please tell me Universal Analytics Tracking code for Measuring Addition/Removal from Cart via GTM? Any one tell me process and code? Thanks!
Reporting & Analytics | | bkmitesh0 -
Installing Google Analytics tracking code on Landing Pages
Hello, I have my landing pages located on a separated subdomain (LP.example.com). I've created a new property in Google Analytics for that subdomain. My question is: where do I have to place the GA tracking code ? in the header ? before I close the tag or before I close the tag ? I have another issue: I've placed the GA Tracking code on some pages in the way below:
Reporting & Analytics | | JonsonSwartz
in the body tag of that Landing page HTML Code I added this line:0 -
Custom Variables to track Vimeo plays on website with Google Analytics?
Hello Everyone, I'm trying to track how many times a Vimeo video is played on my site via GA. Does any of you have any knowledge of how can this be achieved? I've read the documentation and came up with this: After the iframe embed i insert this: Of course the GA is loaded in the header. Does not work, at least i cant see anything in analytics. I have set up the segment as per the attached image. Thanks in advance! Alex E6XnO.png
Reporting & Analytics | | pwpaneuro0