Push Referral URL when form is submitted GTM - google-analytics

I would like to push the referral URL to Google Analytics once someone submits the form on my landing page. Is it possible to do this using Google Tag Manager and also pass a successful form completion?

There shouldn't be any reason to pull the referral URL within GTM. Google Analytics (GA) already does this. To view referrer information, simply add a secondary dimension! Here's a screenshot of where to find the secondary dimension option:
You can use the search box in the secondary dimension dropdown menu to find and apply the Full Referrer dimension. Below, I've provided a screenshot showing the Full Referrer column that is added:

Related

How to setup data layer variables values of a link click in Google Analytics Dashboard

I need understand that is there any way from which I can see my custom data layer variables values in Google Analytics dashboard.
What I have set on website page on link click:
On 4th object you can that I have pushing a variable name "role-name" on link click.
I just want this value on Google Analytics Dashboard. (See below Screenshot)
Please help me how I can see this Google Analytics dashboard later I need to push more than one custom variable value too.
Waiting for kind responses.
Thanks in advance.
You must send that value together with a google analytics hit (for example a custom dimension with pageview tag).

Showing original link being cloaked in Google Analytics

I use a cloaking plugin for my WooCommerce external link products. Because the external links are cloaked it shows the cloaking link in GA. Is there any possible way to show the original uncloaked link in GA even though it is being cloaked? Thanks
You'd likely want to get the uncloaked link and load it to your dataLayer. You can then push it from the dataLayer to a custom dimension in your GA. A custom event, such as an external link click could include this custom dimension. This would provide you with the join between the outgoing click (the cloaked link) and the original link. This is easily doable with Google Tag Manager or a few lines of event code.

GA query parameters breaking link

I'm working on this site k-west.co.uk - if you go to the footer and click the link to Twitter you'll find it doesn't work. Google Analytics has added utm parameters and it seems this breaks Twitter. If you remove the paramters from the url, Twitter works.
How can I tell Google Analytics not to add query parameters to this link? Is there a class or attribute I can add that will do this?
I tried to remove the parameters using JavaScript but as GA only adds the parameters as you click the button, I cannot remove them, I need to prevent GA adding them in the first place.
Thanks
It looks that you're using Google Tag Manager to add Google Analytics functionality to your site and cross-domain tracking is enabled for Analytics tag. But it looks misconfigured as #vinoaj suggested. You need to modify your Google Analytics settings variable to only add cross-domain parameters to the links to target site:
While Auto Links Domain field is blank all the links will be extended with cross-domain tracking parameters.

Track foreign url using google analytics

I have a URL(https://www.mysite.com/tab/subtab/) that belongs to my website(https://www.mysite.com/). Clearly, to track clicks on this url, all I have to do is append the utm_source, utm_medium and utm_campaign parameters to it. Now, what I want to do is, track a url http://www.notmysite.com/tab/subtab/. This url is neither a part of my site, nor is it mentioned any where in my google analytics account, only the link is available for modification. If I append the utm_* params here, the "clicks" information goes to the http://www.notmysite.com website owner's GAQ account and not mine(obviously!). What parameters should be appended to this foreign url, so that I can track the clicks on it?
If this is not possible with google analytics, are there any other options?
Thanks
You will want to look into event tracking to track clicks on links.
https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide#Anatomy
Taking an example from Google's doc:
Click here
Any clicks on that link will now appear in Analytics under Content -> Events. Notice though how I added target="_blank" which is needed for ensure the accuracy of events for external links due to there not being enough time to send the data to Google. A workaround is to add a delay via javascript which is a better approach if you're tracking more clicks.

Multiple links pointing to the same location. Track which one was clicked using Google Analytics

I'm trying to get Google Analytics to track the specific link in the page that was used by the users to get to a specific location.
Say I have links poing to the contact page from the main menu, the page's contents and the footer.
Looking at what other websites are doing, I've added references inside GET parameters for each of the links like so: http://www.example.com/contact?ref=menu , http://www.example.com/contact?ref=content and http://www.example.com/contact?ref=footer . I've also added the ref parameter to the ignore list inside Google Analytics so the three URLs are not tracked as separate pages.
My question now is: How sould I go about tracking which one was used to get to the contact page?
Although the post is a bit old, for others like me finding this via search, here is the solution. Enhanced Link Attribution in Google Analytics.
http://support.google.com/analytics/bin/answer.py?hl=en&answer=2558867
Sounds like you are already tracking them with the URL param.
If Google Analytics is successfully tracking them as separate pageviews with the ref= URL param, then you could create a custom report in GA that shows the number of pageviews. The custom report can be added to your dashboard for quick reference.
The custom report can be set up like this:
Metric groups: pageviews
Dimension drilldowns: page
Filters: include -> Page -> regex -> /contact\?ref=(content|menu|footer)
Or, for each click, add the following to each link:
Contact
Contact
Repeat for each link. This is no more work than adding a ref= to each link.

Resources