Skip to content

Using the Envoy Pixel API

The Envoy Pixel API enables you to share analytics events with us. This is useful for events that are in your environment, namely your website or mobile app. You’ll then be able to see more precise conversion funnels and breakdowns in your Envoy dashboard.

2 - The two main moments in the flow to trigger the Pixel

Section titled “2 - The two main moments in the flow to trigger the Pixel”

There are two main moments events can be sent:

  • Before the sharing flow: events with your subscriber. They have a userId you can share with us, the same one as in the create-link function. Such events could be: loadGiftButton, viewGiftButton.
  • After the sharing flow: events by your Envoy-sent potential lead. In case of gifting, they are the friend of your subscriber. No userId should be shared in this case, but a sharerUserId, corresponding to the id of the subscriber who shared the link in the first place.

We encourage you use those generic event names, so we can locate them more easily in the flow.

Before the flow

  • loadGiftButton
  • viewGiftButton
  • clickGenerateShareLink
  • viewShareDetailsModal

After the flow

  • startSignUpJourney
  • completeSignUpJourney
  • startFreeTrial
  • startPaidTrial
  • completesPurchase
import requests
api_key = "----"
url = "https://api.envoy.is/partner/pixel-event"
pixel_payload = {
"eventName": "viewGiftButton",
"userId": "12",
"extra": {"campaign": "christmas", "userType": "premium"},
}
response = requests.post(
url,
headers={
"x-api-key": api_key,
"Accept": "application/json",
"Content-Type": "application/json",
},
json=pixel_payload,
)