Tracking using google analytics when customer redirects from my website to other website and Places an successful order - google-analytics

I have a magento store. There is a button on product Page which gives option to customer to buy the same product from another website.
If the user redirects from my store to other website, and buys product from other website, I want to track this using Google Analytics.
Being new to Google analytics, I don't know what's the best way to implement that functionality. Please help.

You can measure the click on the button to GO to the other website.
To measure if they buy something there you should add an event on the other website that send the ga data to your own UA id..

Related

Is there an Affiliate plugin or way to track affiliate links with 301 redirects for Ghost CMS

Currently Im using 301 redirects for affiliate links in Ghost CMS. But with ghostboard analytics I can not seem to track traffic.
So two questions. Is there a better way for affiliate links within Ghost?
And how can I track these in a right way?
Thank you!
I did this by connecting the website to Cloudflare, then served Google Analytics through Zaraz (available in free plan).
After this, I set up a click listener for website links with rel=nofollow (a[rel="nofollow"] selector) for tracking affiliate link clicks in Google Analytics without additional software.
Note: New Google Analytics (4) may require some experimentation to see clicks. Set up trigger in Zaraz (Action Name > Event Name = "Aff Click Track Property: href") for GA to create a new event and easily track clicks in Google Analytics.

Why does Google Analytics attribute all Success Page completions to Stripe Checkout, and how to fix it?

I have a problem with google analytics and stripe checkout where all goal completions are attributed to checkout.stripe.com, instead of the actual referring website.
I am using Google Analytics UA and have the Global site tag on all pages. Then I have a goal to track the success page, which stripe checkout redirects to upon successful completion.
User flow:
Website visitor comes from one of the referral pages.
Then they click on the stripe checkout button, which takes them to a stripe hosted page.
On stripe hosted checkout page, enter payment info.
Upon successful payment, redirected to success.html (which is the goal being tracked in analytics).
So when a user goes to success.html, Google analytics attributes the goal completion to stripe checkout, instead of the website that referred them to my site in the first place.
Has anyone else experienced this? Am I doing something wrong or is this just how Google Analytics works when using Stripe Checkout?
This seems like a GA configuration issue rather than Stripe. I'm not really familiar with GA, but if there's some way you can override the attribution, Stripe Checkout lets you set your success_url dynamically. For example, for each customer sent to Checkout, you could include the original referrer in the success URL they'd ultimately be sent to, in addition to getting the Checkout session ID in case you'd like to retrieve some session data (like metadata):
success_url: "http://example.com/success.html?original_referral=ref_123&session_id={CHECKOUT_SESSION_ID}",
https://stripe.com/docs/payments/checkout/custom-success-page#modify-success-url
not sure if you have solved this yet but you can block certain referral urls. Go to analytics go to admin> set up assistant > tag installation> click on your data stream > more tagging settings > list unwanted referrals> then from there just exclude the url you don't want tracked so in your case it's checkout.stripe.com

Measurement protocol for checkout steps

We have implemented transaction tracking using Measurement protocol. Works as a wonder 100% of transactions are tracked.
In the checkout we have option for people to login via Facebook oauth. GA attributes all the transactions to Facebook if people login via Facebook.
I was wondering if it is an option to take out GA code from checkout and create funnel using measurement protocol page views. Which should be very stable and we will solve Facebook oauth issue.
Later on we will implement product impression, product click, promo click tracking using data layers and GTM.
Do you think such approach would work?

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 track cliks on banners in google analytics

I would like to track clicks and views of banners on my website to give statistics to the advertisers. These banners are added via custom post type in Wordpress.
If I use the URL builder tool to generate that kind of URL: http://widget.newswire.ca/registration/submit_form_cnw.php?l=cafr&utm_source=fpjq&utm_medium=bigbox&utm_campaign=cnw is it ok?
I mean, is it the right way to do it?
Usually you use the URL builder tool when you have external campaigns like advertising on another sites, sharing links on social media, etc. It's normal that your advertisers will give you the destination URL with the tracking parameters they want so they can monitor their performance in GA on their end.
In order to track clicks on the banners you host on your site you should use either virtual pageviews or event tracking:
Classic GA:
https://developers.google.com/analytics/devguides/collection/gajs/asyncMigrationExamples#VirtualPageviews
https://developers.google.com/analytics/devguides/collection/gajs/asyncMigrationExamples#EventTracking
Universal Analytics:
https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs#virtual-pageviews
https://developers.google.com/analytics/devguides/collection/analyticsjs/events
You can add a small delay so GA has enough time to execute the code.

Resources