How to Use Merchandising Variables

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.

Implementation

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:

  1. Track the click, or
  2. 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, s.tl()).

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:

  1. “Product Syntax” and
  2. “Conversion Variable Syntax”

“Product Syntax” essentially means you use the s.products variable (see here or here) to specify both the product in question and the merchandising variable in one go.

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:

	s.events="prodView,event5";
	s.products=";lnvx201;;;;evar15=cross-sell";

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:

	s.eVar15="browse";

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:

	s.events="prodView,event5";
	s.products=";lnvx201";

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.

Notes

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.

9 thoughts on “How to Use Merchandising Variables

  1. Hi jan,
    an advanced usage and implementation explained well 😉 I’ve often used Merch eVars also for categorization* if a product is availbale in more than one place or belongs to more than one other product (software: driver-cd for several devicemodels) to analyze which one or combination performes best.

    *For those who do not know: Category in s.products binds only the first used category to the product

    Best regards,
    Bijan

    Like

  2. Hi Jan,

    Just a quick question based on your example for Product Finding Methods using a merchandising eVar. Once you bind the finding method to the product on the success event “product view”, the success event is then complete. The only struggle I see with this situation is that you cannot then associate conversion credit to that binded value later.

    For instance, you would ideally like to answer both questions:
    1) how are users most often getting to products (which you’ve covered here)
    2) which of these methods are the most profitable (which is still left unknown)

    What would you suggest as a work around? Would you set a secondary merchandising eVar on the product page to collect finding method and product ID, and set the success event to conversion? Just curious of how you’d handle this type of tagging challenge.

    Best,
    Ryane

    Like

  3. First of all – one of the best explanations of merchandising eVars I’ve read! Thanks for that 🙂

    I built up a mental model for (merchandising) eVars – would you mind giving me your opinion on that?

    – A regular eVar is somewhat like an “array” and every time I set a value, this is added to this array

    e.g. [value1, value2] –> setting value3 –> [value1,value2,value3]

    Allocation setting tells me, which value I take from the eVar / which value to attribute the success event.

    – A merchandising eVar is quite similar – I also have an “array” and some kind of buffer with only 1 item. Whenever I set the value, this is overwritten in the “buffer”. If at that time (with product syntax) or any time later (with conversion syntax) a binding event occurs, the buffered value is written into the “array” (and we have one array per product of course).

    e.g. “[value3] [value1, value2]” –> setting value4 –> “[value4][value1,value2]” –> binding event occurs –> “[value4][value1, value2, value4]”.

    Allocation works the same – for the values in the “array” (but not the buffered element). This would also cover the “special” case from Adam Grecos Article which is the only case, allocation really matters with merchandising eVars…

    Like

    1. Moin!

      I think about them a little bit differently.

      Each visitor has a virtual storage area in the back end. Each eVar is one space in that storage area. Expiry tells me how long a value will stay valid in such a space, while allocation will tell me whether an existing value can be overwritten (last touch) or not (first touch).

      Your array is good, though, bcs it helps explain other types of allocation.

      For merch eVars, there are just more spaces. One space per product, to be exact.

      The rules for each of those spaces stay the same, of course.

      In your model, there would be an array of arrays for each merch eVar.

      Does that make sense?

      Like

  4. Hi Jan,
    I came up with the “array-model” mainly because of linear allocation – overwriting of course is enough for first/last. And yes – I meant one array per product – so an array of arrays is what I was aiming at. Your model also makes absolute sense to me and I guess in the end it is not _so_ different from mine – replace your “space” with “array” and adjust allocation from “overwriting” to “first/last element” of the array and we’re there.

    Thanks for getting back to this – When I was new to Adobe (not sooo long ago), I had lots of struggles in understanding merch. eVars. After I though of it in “my” model, I was almost sure, I understood how they work – after reading your article and our discussion here I AM indeed sure 🙂

    Like

  5. Hi Jan, is it possible to use two different merchandising evars (one with product syntax and other with conversion syntax) in single product string?

    Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.