I was trying to convert my custome code rule data collection to AEP web SDK. how to replace the _satellite.track() call in AEP web SDK | Adobe Higher Education
Skip to main content
Level 3
June 17, 2025
解決済み

I was trying to convert my custome code rule data collection to AEP web SDK. how to replace the _satellite.track() call in AEP web SDK

  • June 17, 2025
  • 2 の返信
  • 591 ビュー

var iframe = document.querySelector('iframe[src*="vimeo"]');
var player = new Vimeo.Player(iframe);
var cent, counter25 = 1, counter75 = 1, retVal, flag = 0;
var isVideoEnded = false;

player.on('timeupdate', function(data) {
cent = data.percent * 100;
isVideoEnded = false;

if (0.04 <= data.seconds && data.seconds <= 0.90 && flag === 0) {
flag = 1;
_satellite.track("video_start");
}

if (Math.floor(cent) === 25 && counter25 === 1) {
_satellite.track("video_25");
counter25++;
retVal = true;
}

if (Math.floor(cent) === 50 && counter25 === 2) {
_satellite.track("video_50");
counter25++;
}

if (Math.floor(cent) === 75 && counter75 === 1) {
_satellite.track("video_75");
counter75++;
}

if (data.seconds === data.duration) {
_satellite.track("video_end");
counter25 = 1;
counter75 = 1;
isVideoEnded = true;
}
});

player.on('pause', function(data) {
if (!isVideoEnded) {
_satellite.track("video_pause");
}
});
I am using this code in my window loaded code. Now I am trying t convert this code in AEP web SDK. 
I was stuck, what to replace the _satellite.track() call in AEP Web SDK.

can anyone help me this.

ベストアンサー Jennifer_Dungan

Maybe I am missing something, but _satellite.track() calls the Rule that actually creates the tracking call... why can't you just change those rules that you are calling to use WebSDK instead of AppMeasurement?

 

WebSDK rules still need triggers to know when to run... and _satellite.track() is the trigger.... 

2 の返信

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 17, 2025

Maybe I am missing something, but _satellite.track() calls the Rule that actually creates the tracking call... why can't you just change those rules that you are calling to use WebSDK instead of AppMeasurement?

 

WebSDK rules still need triggers to know when to run... and _satellite.track() is the trigger.... 

Vinay_Chauhan
Community Advisor
Community Advisor
June 17, 2025

You're right, _satellite.track() is just used to manually trigger a rule by name. It doesn’t care whether the rule sends data via AppMeasurement or the Web SDK. So if you're already using_satellite.track("video_25"), and that rule fires a Beacon with AppMeasurement, you just need to update the action part of the rule to use the AEP Web SDK instead.

No need to replace_satellite.track() in your Vimeo code. Keep using it as the trigger, just ensure the corresponding rule in Launch is set to use "Send Event" with Web SDK instead of the legacy Adobe Analytics action.

So basically:

  • Keep_satellite.track("video_start") and others in your code.

  • Go into Launch --> find the rules with those event names.

  • Update the actions to use "Send Event" with AEP Web SDK.

That should do it, let me know if that helps!

PadmajaS作成者
Level 3
June 24, 2025

I have tried your solution. It was working for all video event. But not sure how to pass the evar through the custom code. In custom code am using s.eVar2="value". how to convert this in webSDK?

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 25, 2025

Ah.. seeing values directly... Since I am not on WebSDK, I don't have that code immediately handy, but I believe you can set value into the Data Stream schema?

 

This may take some trial and error.. but maybe referencing the xdm object in your custom code:

 

xdm.xxx.xxxx.xxxx = "value";

 

You will have to figure out the path where your eVar data is being populated...

 

If you are using the analytics model within the data stream, you might need to reference:

 

data.__adobe.analytics.eVar2 = "value";