Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Satellite.getVar change

Avatar

Avatar
Contributor
Level 2
Locutus243
Level 2

Likes

19 likes

Total Posts

37 posts

Correct Reply

0 solutions
Top badges earned
Contributor
Shape 1
Give Back
Ignite 1
Validate 1
View profile

Avatar
Contributor
Level 2
Locutus243
Level 2

Likes

19 likes

Total Posts

37 posts

Correct Reply

0 solutions
Top badges earned
Contributor
Shape 1
Give Back
Ignite 1
Validate 1
View profile
Locutus243
Level 2

05-11-2019

Since the most recent update to the Core and Adobe Analytics extensions has anybody noticed some differences in behaviour in the satellite.getVar function?

We were using it in a couple of data elements and it doesn't seem to be working correctly...but if I replace that line in our custom code with the relevant javascript string then it seems to work ok.

Wondered if anybody else had encountered such an issue?

Accepted Solutions (0)

Answers (6)

Answers (6)

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct Reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct Reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

06-11-2019

try to give the event to the dataElement:

_satellite.getVar("de-name",event);

Avatar

Avatar
Boost 1
Level 1
1640
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
1640
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
1640
Level 1

28-11-2019

If the rule that is firing is an Event Type of Direct Call, then the Data Element doesn't have access to `getVar`. You can access the values inside the Data Element through `event.detail.name`, and `event.detail.value`.

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct Reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct Reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

06-11-2019

maybe there's something wrong how you pass the event to the dataElement? what code do you use to pass the event to the dataElement?

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct Reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct Reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

05-11-2019

you mean that the getVar doesn't return the correct data? and it is not a timing issue?

Avatar

Avatar
Contributor
Level 2
Locutus243
Level 2

Likes

19 likes

Total Posts

37 posts

Correct Reply

0 solutions
Top badges earned
Contributor
Shape 1
Give Back
Ignite 1
Validate 1
View profile

Avatar
Contributor
Level 2
Locutus243
Level 2

Likes

19 likes

Total Posts

37 posts

Correct Reply

0 solutions
Top badges earned
Contributor
Shape 1
Give Back
Ignite 1
Validate 1
View profile
Locutus243
Level 2

06-11-2019

It's as simple as:

-------------------------------------------------

    var closest = event.target.closest("[data-track]");

    if (closest !== null) {

      return closest.dataset.track;

    }

    if (closest.parentElement.dataset.track !== null) {

      return closest.parentElement.dataset.track;

    }

  }

-------------------------------------------------

But this effectively drives our rules. So I know the data element is working...otherwise our rules wouldn't fire. We also pass this value into a Prop for debugging (which also works). And when I try the code itself instead of using the satellite then that also works.

So I know the code works OK. Seemingly the only flaw is the satellite.

Avatar

Avatar
Contributor
Level 2
Locutus243
Level 2

Likes

19 likes

Total Posts

37 posts

Correct Reply

0 solutions
Top badges earned
Contributor
Shape 1
Give Back
Ignite 1
Validate 1
View profile

Avatar
Contributor
Level 2
Locutus243
Level 2

Likes

19 likes

Total Posts

37 posts

Correct Reply

0 solutions
Top badges earned
Contributor
Shape 1
Give Back
Ignite 1
Validate 1
View profile
Locutus243
Level 2

05-11-2019

It's not returning a value...and I don't think it's a timing issue. I've been trying to debug using console logs. Maybe I can explain...

Into a data element we pass event.target to define what has been clicked. We then in another element call what has been clicked..e.g. _satellite.getVar("Clicked")

To check what is being returned, in that second data element I've added console.log(_satellite.getVar("Clicked") and it returns a null value.

But then directly after I add console.log(event.target) and this value comes through fine.

That's what leading me to believe it is something wrong with the _satellite.getVar function.