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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

satellite.track complications in server side rendered react component?


Level 2

We just launched a new site using a server side rendered react framework. In trying to send some _satellite.track objects (according what I have read to be best practices for a SPA), "_satellite" is undefined.


The developers then tried to use window._satelitte but from there they had an error where if a string wasnt passed to the tracker it threw another error so then it became stringified as a JSON object.


Does anyone know of issues with sending "_satellite.track" in React? Or are there other methods I am missing? 




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

2 Replies


Level 2

I am not sure of direct call rule working with react code or not but you can create customEvent() in react code and then using Launch core extension, create a event customEvent which will identify the custom event value and fire the launch rule on user action. 


Example Sample code for javascript is :

var viewEndCustomEvent = function viewEndCustomEvent() {
	  var event = new CustomEvent('event-view-end');
	  var obj = document.querySelector("#spa");
obj.dispatchEvent(event); };



Community Advisor

As mentioned below a Direct call rule should do the trick.


Then depending on desired action first make rule "newPageload" in this case each firing a pageview.


Then make sure your SPA for each new state change(virtual page load) fires the rule:




as long as app fires it when desired(up to you and devs) then teh action will fire your code.


2 things to watch out for:


Make sure satellite track and all elements are page ready before page bottom.

On some SPAs the initial load may double fire so you may need to suppress it.