Merchandising variables are a special feature of Adobe Analytics. The Reference page in the help section says “Merchandising variables let you configure an eVar to hold multiple values.”
To be precise: a Merchandising eVar can hold one value per product.
If you want to know why you’d use Merchandising eVars, or if you want to explain it to your friendly marketer, use the Merchandising Variables article in the help section.
Remember how eVars work in general? You put a value into it. The value persists until the configured expiry of the eVar. Whichever Success Events happen during that time will be attributed to the value you set.
Example: assign a tracking code to an eVar and you’ll be able to tie back all Orders, Revenue, newsletter sign-ups and whatever else you’re tracking to the tracking code.
Merchandising Variables work exactly the same way (they are eVars), but they take into account the product, which makes them perfect for a couple of use cases.
Navigation in the Days of the mobile Device
One such case is called “Product Finding Methods”. It essentially helps to analyse how potential customers find the products they are then seeing, adding to their cart, or even buying.
It is immediately obvious that unless you only sell one thing at a time, people will get to your different products via all sorts of ways.
They might have found the first thing straight from Google, say a camera. Then they saw your product suggestions on the page and also added an SD card to their order. They subsequently searched for an underwater case for the camera, found it and placed it into the basket as well.
Three products, three different ways of finding them. That’s why you have to analyse by product.
Your friendly marketer will later be able to see that SD cards sell best as cross-sell whereas people usually search for underwater cases (your mileage may of course vary). Knowing things like that will a) help them understand the customers and b) present products accordingly. Very important.
If you first implemented with the help of Adobe Consulting and if you’re a retailer, they will have suggested you implement it.
You can follow Implementing a Merchandising Variable closely and you should be fine.
I’ll walk you through the example, though.
First of all, let’s think about what we need.
We need to think about what different ways our site has on offer for finding things. Navigation, Search, Promo-banners, cross-sell, “people who bought this also bought that” widgets and possibly more. Make a list.
Each one of those needs to be tagged up. For some of them, that’s easy, for some not so much. So we have to amend the list, think about how we’re going to handle each method.
Search should be pretty easy — just set the Merchandising eVar to “search” on the results page. You might even be able to do that in the
s_doPlugins() method in the s_code.js file. Check where you are setting the “Searches” event (usually event1 or event2) and add the assignment of the eVar right there.
Banners and promos should also be easy, especially if you are already tracking what we’d call “Internal Campaigns”. For those, you’d have added internal tracking codes to the URLs, so all you need to do is detect whether the URL has one of those, then set the Merchandising eVar accordingly.
Cross-sell might actually be handled similarly if your marketer decided so, or it might more be like navigation.
Navigation is slightly more complicated, and there are two options:
- Track the click, or
- track on the next page.
The former is more accurate but adds server calls to those clicks, which cost money. The latter fails when people click but then abandon, but it is cheaper.
Method 1 — add code to the
onClick handler of the links in the menu. That code must set the Merchandising eVar and then track the click using custom link tracking (yes,
Method 2 — when someone clicks a navigation link, set a cookie. On the next page, try to read the cookie. If it exists, set the Merchandising eVar, then delete the cookie. The great thing: you can put the code to do all of that into the s_code.js file instead of on individual pages.
If you have other finding methods, you might want to use one of those two approches. Or maybe you can come up with a new way? Let us know about it!
How to Set?
Oh. Good question! How do you actually set a Merchandising eVar? Well, I’m glad you asked!
As I said earlier, those Merchandising eVars can have a value per product, which kind of suggests that when setting them, the product plays a role. And yes, it does!
There are two ways to set this:
- “Product Syntax” and
- “Conversion Variable Syntax”
On top of that, you have to specify the event (might be prodView or maybe some custom event) that represents the customer’s action.
Imagine the visitor landed on a product page for a laptop bag via cross-sell. The Merchandising variable is eVar15. It might look like this:
According to the documentation, “Product Syntax” is the preferred way of setting a Merchandising variable.
Now think about setting the Merchandising variable for browsing. When the visitor clicks a menu item (which we want to track as “browse”), we have no idea what product she will eventually look at, right? So we can not set the Merchandising variable to “browse” using
s.products. There is simply no product to set it with.
So that’s why we would use “Conversion Variable Syntax”. We basically set the eVar just as we usually would. Example for “browse”, to be set when the user clicks on a link in the menu:
And that’s it. So how does the Merchandising variable bind against a specific product?
Well, eVars persist their value. If you set your Merchandising eVar to use “Conversion Variable Syntax”, you also specify a “binding event”. What that means is that you tell the system that if it sees the “binding event”, it should look at what product is in
s.products and bind the eVar to it.
So, assuming we configured eVar15 for “Conversion Variable Syntax” and the “binding event” as “prodView”, on the product page we will just set this:
As the value in eVar15 persists until it either expires or is overwritten, it can be bound more than once.
And that’s it, really.
For “Product Finding Methods”, we use “Conversion Variable Syntax”, as you might have guessed.
In the example for “Product Syntax”, I added event5 to
s.events. That is current best practice for all built-in product-related events, because those built-in ones are only available in the products reports. Sometimes you want to see a “Product Views (custom)” metric in other reports, and this is how you do that.
The “instances” metric (which I should probably explain in detail at some point) works differently on Merchandising eVars, as the documentation explains.
If you use “Product Syntax”, you should not see any instances for the eVar at all. If you use “Conversion Variable Syntax”, you should only see instances for cases, where all three (eVar, binding event and
s.products) are set at the same time.
Just so you know.
Don’t forget to tell your friendly marketer to read about Merchandising variables as well.