In google analytics, how can I pass a device type and model through ecommerce tracking? - google-analytics

Basically, we use affiliate products. When we get a return call from their servers saying we have a sale, we want to send that information back into GA. Right now we can do that just by loading the page with ecommerce tracking and tacking on UTM parameters in the link based on the user who purchased...
One big thing we want to do though is actually send back the device information the user purchased with back to analytics. we capture it in our custom CRM, I'm just not sure how we can pass it back to analytics. using valuetrack parameters in the URL doesn't work, and i'm not sure how to modify the ecommerce code to figure this out.
Any help is appreciated!!!

Related

Can't track in Google Analytics data from GetResponse

Our email marketer is sending email from GetResponse with a tracking code generated from another tool,
but we can't see if the users are coming from the email source.
Is it possible, because it is with tracking code generated from other tool, GA to mark it as direct traffic and is there a way to know it is coming from the email campaign? Also, I am not sure it is tracking it at all, becouse I don't see much traffic in the landing page. The GA is fired, I checked!
The tracking code includes the main domain and it redirects to a specific page.
Example: tracking.ourdomain.com/aff_c?offer_id=46&aff_id=76
You have to check in Landing Pages report (or All pages report), filtering by aff_id, if there are any sessions.
To track in correct mode the source you have to use UTMs parameters. You can build your URL with UTM parameters using this tool. It allows you to easily add campaign parameters to URLs so you can track Custom Campaigns in Google Analytics. Then you can find those sessions in source / medium report.

Is there any API call or any kind of feedback to know whether data is actually sent through google analytics collect endpoint?

I have settled my google tag manager as from the guide.
I have got in place a page that redirect just after the tag gtm-load is collected into the dataLayer. It's actually a "transition" page that should redirect instantaneously.
In this way I make sure google-analytics.com/r/collect is called, as I can see from the network ta of my browser, seems the only way to do so for an "instant redirect page".
However I need to test it from the back-end side.
Is there any way to have a feedback from Google Analytics about the data is actually sent? For example something like google-analytics.com/get/data/lastEntry, so that I can use a restAPI to check it out?
As far as I know, google analytics provide only metrics through a web page, and no actual data sent to.
Moreover there are some Rest API here but they are only for configuration purpose.
you might pass a JavaScript function as a hitCallback parameter of analytics send command and it will be called right after hit data were sent:
https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#hitCallback
Here's an example of how to use it with GTM alongside another useful feature of eventcallback
https://www.simoahava.com/gtm-tips/hitcallback-eventcallback/
Hope this helps.
There is a realtime API in Google Analytics, so what I have done for testing is to call my test URL with utm campaign parameters attached. Then I made a call to the realtime API and filtered by my custom campaign.
The realtime API is fairly limited (no session based values, obviously, you cannot test custom dimensions etc), but at least this tells you if your hit has registered in GA.

How does Google Analytics filters duplicate site entrances

We are implementing a native analytics system and want to apply the same tracking principles Google Analytics uses. We've figured everything out but one thing:
Every time I refresh a page with an url that has utm-parameters attached to it, Google Analytics somehow figures out that it's not actually a visit but the same page that gets refreshed and shows only one visit in its dashboard from that particular source.
Is anybody aware how GA specifically does that so I can replicate it in our system?
I know that I can use
performance.navigation.type
in my JS script, but it doesn't give me desired results.
Any help would be much appreciated.
Attribution in GA happens on the Google servers, so JavaScript will be of limited use. Basically since a reload means that the user has the same client id and no change in the channel (source, medium and campaign are the same as in the previous visit) the existing session will be continued (a change of campaign/source information would trigger a new Google Analytics session).
Google has a very nice chart that explains how campaign information and traffic source information is processed.

Google Analytics Campaign Tracking Issues

A client of mine is having some issues with regards to tracking campaigns in Google Analytics that I was hoping one of you can advise me on.
They have recently sent out an email with the Google Analytics campaign information in the links back to the site from a button in the email (link created with the URL builder).
As well as the Google Analytics information they also send their own parameter for tracking using a bespoke system of theirs. In the end the url that visitors would go to after clicking the button in the email was something along these lines:
http://www.domain.com/pagename/?bespokecampaign=lead_gen/email/email_btn/boxcampaign&utm_source=email_pure&utm_medium=email&utm_term=email_btn&utm_campaign=boxcampaign
Looking at Acquisitions in the Google Analytics report I can see in the past this page has been viewed and has the correct Source/Medium set as email_pure/email.
However, there was a lead gen form that was filled out on the site after landing on this particular page that sends an event action that the form was filled out. When trying to view the campaign information for these events I do not see any information regarding the Source / Medium for that event being the correct information from the URL.
The Salesforce model in place to receive these leads took the referrer URL correctly, containing the Google Analytics parameters, but there was no record in Analytics to suggest one of the form events had the Source/Medium of email_pure/email.
Does anyone have any ideas on what could be causing this and potential fixes?

How to set up Google Analytics with conversion tracking

I've been tasked with enabling Google Analytics ecommerce tracking on a client's website. I've read Google's documentation on the subject, but it made little reference to tracking conversion data, which is a feature that our client has asked for.
My question is this: on which page(s) do I need to add information regarding items/transactions? We have pages for shopping cart, payment info, confirmation, and receipt. The Google documentation only mentions putting this code on the receipt page, but I feel as though this wouldn't give us the information necessary to track conversions. Is Google Analytics able to track this information simply by virtue of having the general page tracking code on each page, or does transaction info need to be tracked across all of our checkout pages?
You only need the item/transaction tracking code (_addTrans(), _addItem(), & _trackTrans()) on one page, after the purchase has occurred -- in your case it sounds like the receipt page.
You do need to make sure that the general analytics code is on every page, including the checkout and receipt pages, otherwise you can lose the chain of tracking data leading up to the conversion.

Resources