1

So, I have the main static page on one server (e.g. example.com) and a single page application (Angular) on another server but on the same domain with a subdomain (e.g. ma app here - sub.example.com). In the static page (example.com) I've installed GA and GTM, and on the application initialized GA and GTM once again when the user navigates to it (sub.example.com)

Also, I have run ad campaigns on facebook and google.

I need to track the users that came from ad and navigated through example.com -> sub.example.com/registration -> sub.example.com/user - it will be a goal (or sort of conversion goal).

If it real, how I can track it?

UPD: I've fixed tracking goals by replacing analytics.js tracker to gtag.js and rewrite my tracking system according to the gtag requirements. Not sure, but hope that now I can track users from ad campaign to destination.

  • Does the static page use Google Adsense? When you run ad campaigns where do you send the traffic? To example.com or to sub.example.com? I ask because I'm trying to determine if it would be appropriate to use UTM parameters on the links on example.com. – Stephen Ostermiller Apr 24 at 10:39
  • @StephenOstermiller static page does not use Adsense. Ad campaigns from Google Ads (Adwords) and Facebook Ads (Business). Users from campaigns go to example.com, but I need to track a goal when the user came from campaigns to sub.example.com/user, but between campaign and destination (sub.example.com/user) could be few other pages – Art Olshansky Apr 24 at 13:59
1

Provided you are using the same GA tracking ID on the domain and subdomain, then it is doable.

Create a new View and apply a filter that prepends the hostname to the requestURI in the pages report.
Filter Type: Custom filter > Advanced
Field A --> Extract A: Hostname = (.)
Field B --> Extract B: Request URI = (.
)
Output To --> Constructor: Request URI = $A1$B1
Click Save to create the filter.

Then configure a destination goal, based on the the filter modified url.

| improve this answer | |
  • Yeah, I'm using the same GA ID on both. And I have the same filter, it show the pageview but not track the goal ¯_(ツ)_/¯ – Art Olshansky Apr 27 at 7:54
  • Can you edit your post to show the goal configuration – Bronwyn V Apr 27 at 8:01
  • Goal config screen, Pageviews stats screen, Goal stats screen – Art Olshansky Apr 27 at 10:09
  • Your config screenshot, the goal match type is Equal to however you have not adjusted the goal destination URL to take the filtered url into account that is now prepending the domain or subdomain name, you are using the unfiltered request URI ..which is why it is not working for the goal. – Bronwyn V Apr 27 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.