Expand my Community achievements bar.

Take 10 minutes to complete an Adobe Target review on Gartner Peer Insights, and as a thank you for your time, you’ll have the option to receive a $25 gift card!
SOLVED

Target Web SDK sendEvent adding __view__ to scopes - why?

Avatar

Level 3

We are migrating a client to the Web SDK.  Their front end used to make a bunch of target.getOffer() calls using named mboxes to get back JSON data telling it which experience to render.  To migrate to alloy, we duplicated this with (roughly) this code:

 

alloy("sendEvent", {
  renderDecisions: false,
  decisionScopes: [
    "mbox_name_goes_here"
  ].flat(),
  data: _satellite.getVar("Target Profile Params") || {}
})

 

It works like a champ from a test delivery standpoint.  However, when I look at the edge trace, I see that in addition to the scope that we include in the array, __view__ is added as well.  The target_trace items show the global mbox being called.  There are several of these calls made on one page (working to get that changed, but that is another tale), so it seems a lot of extra work.. We eventually WANT the global mbox tests evaluated when we track the page view.

 

Something worse that I think might be related to this is that even though no tests had propositions returned that would be rendered automatically (we have to do propositionDisplay calls later for those), there is an analytics hit sent.  Since this can be a landing page, this means the first hit in the visit is NOT the page view, and our campaign first touch is usually unspecified AND when looking at evars using the Visit metric we frequently see Unspecifieds for everyone (along with the value we want).

 

Is this expected behavior?  Any way around it?  If I wasn't already bald, I would be pulling my hair out.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

This isn't expected behaviour; I've also tried to replicate this on a demo page with Target but I can't. The first sendEvent that happens on my page contains the "__view__" global mbox decisionScope, then I run your example code in the console but I only see "hero-banner" in my decisionScopes array, both in network request and also further downstream via Assurance debugging

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

This isn't expected behaviour; I've also tried to replicate this on a demo page with Target but I can't. The first sendEvent that happens on my page contains the "__view__" global mbox decisionScope, then I run your example code in the console but I only see "hero-banner" in my decisionScopes array, both in network request and also further downstream via Assurance debugging