Building Personas on Adobe DTM

So Tealium has this thing called AudienceStream – it’s a really neat tool that helps you build personas and deliver custom content to those personas. It’s incredibly slick and actually looks/behaves like a feature proposal I brought to the DTM (then Satellite) team 2 years ago. 2 years later it isn’t there and we have to work with what we’ve got! So how do we build something similar within the DTM framework? Well, let’s begin with a use case:

We have a landing page with 2 links – one saying “Shop for Kids” and “Shop for Adults”. We would like to determine whether the shopper is a kids or adult shopper:

  • Serve kids content across website to user who clicks on “Shop for Kids”
  • Serve adult content across website to user who clicks on “Shop for Adults”

Let’s start with the easy way to do it for starters:

Data Elements Only

Step 1: Create a custom script data element

Step 2: Define the kids/adult pages:

return ‘kids’;}
else if(…){return ‘adults’;}

Step 3: Set scope to User to remember them indefinitely

Now you can create rules that deploy logic based on whether the person is shopping for a kid or an adult. This is fine, but what happens if that kid shopper inevitably ends up navigating to the adult section? The cookie switches and that initial intent is reset to “adult”. What if we want to retain that initial user intent? If you’re relatively experienced with DTM, you might be thinking one option would be to just check to see if the Data Element exists – if it does then don’t fire anything. However, by checking to see if the element exists you’re executing the query again. Simplified:

Intent: “If the data element isn’t null then don’t set it.”

Result: “If the data element can exist, reset the value. Now check to see if it isn’t null – if it isn’t then don’t set it.”

So simply by checking to see if the Data Element exists you could be resetting it! Even using _satellite.getVar(‘Data Element’) returns a new value if one is eligible. So this won’t satisfy our requirements of showing kids content to users across the whole site based on that first action. Ugh, alright. So how do we do it?

Combine _satellite.setCookie & Data Elements

Okay, so we want to remember what kind of shopper the person is for just one session and we don’t want it to change. For this we would use a combination between _satellite.setCookie and a Data Element.

Step 1: Create a custom script data element

Step 2: Define kids/adult pages:

return true;}

Step 3: Set the scope for session

So what did we do here? We just set a data element that lets us know whether or not the user has landed on a kids/adult page. Our next task is to define what kind of shopper these people are with Page Load Rules. If the cookie value is null (determined via the _satellite.readCookie(key) method), set it:

For kids pages: _satellite.setCookie(“type”,”kids”,1)

For adult pages: _satellite.setCookie(“type”,”adults”,1)

That third value represents the number of days that the cookie will be stored. Any value greater than zero will work just fine.

Now we know 2 things:

  1. The user has been to a kid or adult page during the session
  2. Whether the user is a kid or adult shopper

Finally, we combine each one into a page load rule where we execute code only if the Data Element = true and if _satellite.readCookie(“type”) equals ‘kid’/’adult’. A little painful, but it does the trick.

Additional Notes: I suppose one option users may want to use is to set the storage value to 0.02 (which = 30 minutes). Unfortunately, we never know how long a user session could take. It could last seconds, minutes, or hours. Setting it for a day is a safer way to ensure you’re at least giving them a second chance to choose a day later.

Another potential consideration is the fact that users may arrive to the site later that day and will not have the opportunity to reset the cookie since the cookie duration is 1 full day. Well… we may just have to live with that, but you might also want to consider using fractions of a day (I’ve never tried this).

Leave a Comment