- What happens to your e-commerce data in Google Analytics
when you issue a refund to an order.
How can we signalize to Google Analytics
that this order was refunded.
In this video, I'm gonna show you how you can send
refunds into Google Analytics
with the help of a Google form.
All the more coming up right after this.
(upbeat techno music)
Hi there and welcome to another video of Measureschool.com
where we teach you the data driven way of digital marketing.
My name is Julian and on this channel, we do tutorials,
how-to videos and take a look at useful
little pieces of marketing tech just like this one.
So, if you haven't yet, consider subscribing.
Now, processing refunds has been a functionality
within the enhanced e-commerce tracking features
in Google Analytics for quite some time now.
But how can you actually send that data
to Google Analytics.
In some cases, you can connect your backend data
to Google Analytics to process these refunds,
but especially with out of the box shop systems,
this is not always possible and not always built in.
So, today, I wanna show you a simple way
to process Google Analytics refunds
via Google forms.
Our template that we'll be discussing today
will be available at measureschool.com/refundr.
Now we got lots to cover, so let's dive in.
Alright, today our journey starts in the e-commerce reports
of Google Analytics.
Now, I have a enhanced e-commerce tracking installation
there and you need to have that enabled in order
to see refund data.
So, make sure on the e-commerce settings,
that you are using the enhanced e-commerce abilities
of Google Analytics.
And then you'd be able to look into the e-commerce report
and under sales performance, you can see
the refund amount here.
Now, this will tell us how much of these orders
was refunded.
So, how can we actually fill this refund column here?
Well, you could implement some JavaScript onto your website
to send over this data to Google Analytics,
but in most cases, wouldn't even have a page
that the user visits in order to issue a refund.
Sometimes this happens on the phone
or through another backend system.
Now you could connect this up to Google Analytics.
I have thought of a solution where you would actually use
a Google form.
So I came up with this GA REFUNDR idea that lets you
input your refunds into this Google form
and sends them over to Google Analytics.
What do you need for this?
First of all, your Google Analytics tracking ID,
which you'll find in the admin section
under your tracking information.
Here you have our Tracking ID,
which we simply input and then we need to know
the exact order ID.
So let's go back to our reporting
and find the transaction ID.
Let's say we want to refund this transaction.
You simply would copy it and put it into the
order ID field or the transaction ID field
and then we can choose whether we want to go through and
do this as a partial refund or a full refund.
Now I will go with a full refund here.
So, I'll go on No, click Next
and Submit our Google Analytics REFUNDR request.
Now this should trigger automatically a refund.
This is sent over with an event.
So, in our realtime reporting, we should see that
there's an event being transmitted.
Here we go.
Our event Ecommerce and Event Action is Refund.
Now this takes a while to actually be populated
into our reports.
So let's go ahead with another example and let's say
we want to do a partial refund here.
For that, we would again need to have our Transaction ID.
Simply submit another response here.
And again, our Google Analytics Tracking ID.
And this time, we will do a partial refund.
So, you click on Yes, which will take us to the next step
where we can input the first product that we want to refund.
So in order to know which product this is,
we simply need to look into the order that we want to
refund or partially refund.
We'll click here on this order and it will give us
the products that were bought.
So, let's say we want to refund this iOS T-shirt.
Let's display the product ID as a secondary dimension.
We have here the Product SKU, which is basically
the product ID.
Let's copy that and input it in our product ID field
and then the quantity, which would be one.
Do we want to add further products to be refund?
No, we want to just refund this one product ID.
Let's click on Next.
And Submit this again.
Now you can refund up to four different product SKUs
with this form.
Again, this should trigger a new event
right here in our Events Last 30 Minutes tab
because this is actually a non-interactive event.
And that should, again, fill our sales performance
refund column right here.
Now, as I mentioned, this takes a little bit of time.
So, let's go over how you can implement
this solution if you want to use it.
All you need to do is go over to measureschool.com/garefundr
where you will be able to copy our form.
Just click on Make a copy.
Now you need to have a Google account and you need to be
signed up to Google Drive to do this
and then, this will generate a copy of your GA REFUNDR,
which you can also then customize if you want to.
The key being here that this is tied to a
Google app script, which we need to configure.
So if you click on More here, need to go to the
Script editor and this is where the magic actually happens.
So, if a new response is submitted,
it will go through the answers here and map them towards our
Google Analytics request and in the end,
send that data over to Google Analytics through
the measurement protocol.
Now the only configuration we really have to
take care of is setting up the trigger,
which always has to be done.
Again, just simply go to resources here
and click on current project triggers.
There's nothing set up, so you will need to click on this
link here and then run the refund From Form,
On Form Submit.
Now if you wanna keep track of any kind of errors
that might occur, then you can send yourself an email
on a daily or immediately if the error happens
just to debug this.
I tend to keep this option ticked.
Let's save this and you will be asked to review
the permissions because this script will actually
send data to Google Analytics, so let's review this
and we see this connects to external services,
which is the Google Analytics measurement protocol.
Now, I won't actually be able to see any or view
any of your data in Google Drive.
This is all tied to your Google Drive account.
Click on Allow and you are ready to go.
You can close this window now and here's your
finished form that you can now use to process refunds.
All you need to do is use this URL that you find
under Send.
Right here, we have the link
and this is the link we can use to input new data.
Again, let's try this out.
We have here another order that we want to refund.
Input our Google Analytics Tracking ID.
Here we go and click on No because we want to
have a full refund on this.
Let's click Next, submit this whole thing
and see if our event was properly put in place
through our realtime reporting.
And here we go, we see a new event
just came in from the measurement protocol with
ecommerce and refund in them.
This will, of course again, port over
to our sales performance reports.
We then see the refund amount filled.
Now, a bonus tip is to actually, in your sheet,
you'll be able to keep a little bit of a log
from what went out and what went in.
So, if you go back to the edit mode,
you can actually look at the responses that were triggered
and there's also the option to see this in a spreadsheet
where every row here shows a new submission
and that way, you can see what was submitted
and transferred to the measurement protocol
and then to Google Analytics.
Now as I mentioned, it takes a while to actually fill this.
So, I have done some testing beforehand.
Let's just quickly change the account
and here, you see what that would look like
if the refunds go through.
So, I hope you find our Google Analytics REFUNDR useful.
So, there you have it.
This is how you can process refunds via Google forms.
Remember, you can download our form template
at measureschool.com/garefundr.
The script was developed by myself,
so I'd be happy to take any kind of feedback or questions
in the comments below.
And as always, if you like this video, please share it
with a friend or a colleague and subscribe to this channel
to get more of these videos every Wednesday.
My name is Julian.
Til next time