Skip to content

Commit

Permalink
lotame synch pixel callback
Browse files Browse the repository at this point in the history
  • Loading branch information
prabrisha-rudder committed Mar 23, 2020
1 parent d3c534b commit f63c1c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions integrations/Lotame/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Lotame {

init() {
logger.debug("===in init Lotame===");
window.LOTAME_SYNCH_CALLBACK = () => {};
}

addPixel(source, width, height){
Expand All @@ -38,6 +39,9 @@ class Lotame {
});
}
this.storage.setLotameSynchTime(Date.now());
if(window.LOTAME_SYNCH_CALLBACK && typeof window.LOTAME_SYNCH_CALLBACK == "function"){
window.LOTAME_SYNCH_CALLBACK();
}

}

Expand Down
11 changes: 9 additions & 2 deletions tests/html/script-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
}

rudderanalytics.load(
"1WxuLjndG7YDBT603xZH01mI0HW",
"http://localhost:8090"
"1X6kp0fxQpP5tzg6CAFjQoXkwa6",
"http://localhost:8090",
{
configUrl: "https://api-tf.rudderlabs.com/sourceConfig"
}
);
rudderanalytics.track();
// rudderanalytics.page(); //Turn this on if Chartbeat is a destination
Expand All @@ -35,6 +38,10 @@
<script>
window.rudderanalytics.ready(() => {
console.log("we are all set!!!");
// The below callback is to register this to Lotame as a callback when the dsp pixels get synched.
/* window.LOTAME_SYNCH_CALLBACK = () => {
rudderanalytics.track("synch lotame", {}, {integrations:{"All" : false, "S3": true}});
} */
});
window.rudderanalytics.page();
window.rudderanalytics.identify("fshdgfsd", {
Expand Down

0 comments on commit f63c1c7

Please sign in to comment.