Send Pathmonk Data to External Tools

Modified on Tue, 6 Aug at 8:09 PM

To provide data to external tools, Pathmonk offers an option to create custom triggers. 


If you want to send Pathmonk usage data outside of Pathmonk you can use the following code to trigger the logic that you want to have on your end for tracking purposes:


document.addEventListener("pathmonkControlGroupDisabled", function(event) {
    console.log("disabled group")
});
document.addEventListener("pathmonkControlGroupPathmonk", function(event) {
    console.log("Pathmonk group")
});
document.addEventListener("pathmonkControlGroup", function(event) {
    console.log("Control group")
});


The action will be triggered every time a NEW user is detected so you can tag it accordingly in your system.


Understanding differences in A/B testing data between platforms


You might see differences in the A/B distribution % within Pathmonk vs. the external tools you are connecting.

To understand why please first see the order of steps that are being executed:


  1. Visitor hits your website
  2. Pathmonk SDK script initial load
  3. Pathmonk calculates the A/B user groups
  4. Pathmonk SDK script finishes loading
  5. Pathmonk sends the flags (either Disabled group, Pathmonk group, Control group) to any connected external 3rd party tools


This method might show a discrepancy within Pathmonk vs. the external tools if the user leave the website (bounce or exit) between step 3 and 5. In order to guarantee a 1:1 sync Pathmonk recommends a server to server connection.




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article