Can you add two Google Analytics tracking codes to the same webpage? - google-analytics

I am looking to add two Google Analytics tracking codes to the same web page. Specifically one through Google Tag Manager and one hardcoded on the page. Is this possible to do with one being in GTM? I read you have to set two tracking objects, but how do I implement that if both codes aren't hardcoded on the page?
Thank you.

You can add a tracking code in GTM and another in page.
They will work independently as long as you don't do something strange with tacker names.

Related

GTM + Gravity Forms Goal tracking in Google Analytics

I have a Gravity Form with a text confirmation page, not a redirect confirmation. I would like to track this form through Google Tag Manager to display a goal conversion in Google Analytics (Universal Analytics).
I've followed the steps here: http://www.notesonclick.com/blog/gravity-form-event-tracking-via-tag-manager/
No conversions are being recorded. However when using GTM-debug mode, all the triggers are firing, even the gform.submit.success tag is being fired after clicking the submit button.
Could someone please help?
We've had the same issue. The only way we've been able to get GTM to record conversions is to remove validation. We'd rather it validate, but we haven't found any other workarounds.
I have implement that code in multiple site and it is working fine, Since you are not getting conversion then there might be issue with form Goal Creation in google analytics. or some time i have noticed this things happening when google analytics have been implement directly on the site and event tracking setup through tag manager..
if you still need some more help leave comment in comment box of same blog
I saw the excellent and elegant solution by Dinesh but was not able to implement it on the site I was working with. I put a hack together that work correctly. For detailed instructions, please see here.
http://www.albanyanalytics.com/2018/03/gravity-form-tracking-with-google-tag.html

Adding GTM to a website with GA

I have a website that has been using GA for some time. Now someone wants me to add it to theirs GTM and replace my snippet with that GTM tag.
I don't know how to use GTM and don't really want to dig into that :/
My website was working just fine... Is there some easy way to make GTM just a simple middle man that looks at my domain and just throw everything directly to GA?
I manage to make it so GA gets info on the website traffic like active users etc. however that website has scripts that fires events to GA.
After googling a while i think this is because GTM adds some random names to the trackers and my code calls ga('send', ... ) directly :/
I know i can make a custom tag in GTM but they want it to be UA tag -_-.
Is there any way to set a default name for my trigger in GTM settings? Or some other solution?
atm. i have a code with gtm tag only and I'd rather avoid changing my web code if possible.
Edit
Ok, could someone explain to me how to achieve this:
I have this code:
var a = $('meta[property="a"]').attr('content');
var b = $('meta[property="b"]').attr('content');
ga('send','event',a,event,b);
where event is one of several possible strings of for example 'event_1','event_2' or'event_3'
and my GA has 3 goals that have action = 'event_1' etc.
How do i replace this with GTM and dataLayer?
This thread has 2 questions :
1.- Migrate a hardcode implementation of Google Universal into Tag Manager is not so simple as copy and replace the Universal Main Snipper for the GTM Code.
Look for this google guide to migrate. Has more or less the steps needed and the one to take in consideration during the migration.
https://developers.google.com/tag-manager/devguide#migration
If you goes for GTM, it's higly recomended to remove your ga() function on the page, this will stop working and you javascript too. Basically this mean, remove all your Google Analytics of the domains and install GTM and configure the corrects tags. Try to avoid things like paste the Google Analytics code inside a custom HTML tag, it's a very bad practice, but is see that a lot. Plan your migration
2.- Regarding the event you have to do :
Create a tag of universal analytics events and activate when you pushes a GTM event, them manage this values via the dataLayer
Let this link for more information:
https://support.google.com/analytics/answer/6164470?hl=en
var a = $('meta[property="a"]').attr('content');
var b = $('meta[property="b"]').attr('content');
dataLayer.push({'event': 'ga_event' , 'cat' : a , 'act' : b})
Try to involve more yourself in the GTM and Universal's World before ask, i'm not trying to be an asshole, but this question involves so many things that can be solved just looking the documentation, and somany thing to examplain in a single post.

Google Analytic's / Duplicate entries / Google Tag Manager

We have Google Analytics on our site. This site also uses Google Tag Manager (unsure whether this is causing the issue or not).
The issue is that within Google Developer on the Network tab it looks like Google Analytics is being called three times, therefore messing up the actual analytics side.
I have searched the web for this issue but most put it down to the page refreshes etc. This is not the case with ours. This happens when it is first loaded.
Each URL is different slightly. I looked through the site code hoping to find duplicate data (script for Google Analytics), sadly I haven’t. Neither have a found duplication when I 'View Source'.
At this moment in time I am puzzled as to why this is happening.
I have noted the parameters are slightly different between the three, I am thinking this is why it looks like its being called three times, why would it do this?
DP: Document location URL (The call which doesn't contain GTM, contains this)
GTM: Google Tag Manager (Two of the three
have this in the third doesn't)
CD1: ? (The call which doesn't contain GTM, contains this)
Z: Cache
Any ideas will be greatly appreciated.
Thanks,
Clare
Most definitely possible that GA and GTM both sending page views. If you are using GTM then you should remove ALL GA code from your pages as GTM replaces all GA.

Google analytics page tracking

I have a question about google analytics page tracking. I have a website and the main domain is www.tdconnect.nl. Now I want the following. All pages hanging under tdconnect.nl/cisco/. Should get a separate Google Analytics. What is the best way to do this?
Thank you!
Using a default GA tag would do the job unless you specifically want to completely independently track the cisco subdirectory. in which case 2 separate tags are required, and you should check outthe following https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite#singleSubDirectory
From what I understand, you want to show data under tdconnect.nl/cisco/ in a separate GA account.
You may choose to create a new filter against your directory.
(Recommended).
You may create a different GA Account altogether and
then change the property ID on the new section.
You may choose to create a new sub-domain cisco.tdconnect.nl

Tracking clicks using both Webtrends + Google Analytics

I need to track clicks to a webpage that already has Webtrends codes embedded. The thing is that I also need to track clicks to that page using Google Analytics.
It would have been easy if I can just embed Google Analytics's code on to the landing webpage but my client does not allow us to modify their webpage.
My question now is that, is it possible to track clicks on both Webtrends and Google Analytics by placing two tracking parameters (or syntax; query) onto one single URL?
For example:
http://example.com/adredirect.php?WT.mc_id=XXXXXXX?utm_source=XXX&utm_medium=XXX&utm_campaign=XXX
Within the "adredirect.php" page, I then can embed our GA code inside, with a redirect code to the correct landing page. I know for sure that by clicking the link above it will lead the browser to my desired page. What I don't know is that will the two parameters be actually captured correctly by both GA and Webtrends?
Are there other ways to achieve similar tasks?
Thanks to all that have time to help.
Regards!

Resources