Conversion Tracking

Track Conversion event

Tracks a conversion event for a registered participant.

Templates supported

  • The Milestone Referral
  • The Altruistic Referral

What is conversion

Let's say that you have a web page where the users signup and then they make an action, eg a purchase.

The registration to Viral Loops can be completed either by using the Form Widget or via a Custom Form.

In case you want to reward the users that not only have referred their friends to signup, but also their friend has completed an action - the purchase - then you need to use the conversion method. That way the referrals will be counted when someone converts, not just signing up.

To do that, you can use the Javascript API or implement the following HTTP request:

Request

{
  "method": "post",
  "url": "https://app.viral-loops.com/api/v2/events",
  "body": 
    {
      "apiToken": "my_secret_api_token",
      "params": {
        "event": "conversion",
        "user": {
          "email": "[email protected]"
        }
      }
    }
}

Payload

{
  "type": "object",
  "properties": {
    "apiToken": {
      "type": "string"
    },
    "params": {
      "type": "object",
      "properties": {
        "event": {
          "type": "string"
        },
        "user": {
          "type": "object",
          "properties": {
            "email": {
              "type": "string"
            }
          },
          "required": [
            "email"
          ]
        }
      },
      "required": [
        "event",
        "user"
      ]
    }
  },
  "required": [
    "apiToken",
    "params"
  ]
}
{
  "apiToken": "my_secret_api_token",
  "params": {
    "event": "conversion",
    "user": {
      "email": "[email protected]"
    }
  }
}

Responses

Successful Response

Status: 200 OK

Body:

{
  "status": "processing"
}

Error Responses

Status: 400 Bad Request

CodeErrorWhen
600ValidationErrorWhen the payload is missing required properties.
601PayloadErrorIf the apiToken and publicToken is missing.
605NotFoundErrorIf the campaign is not found.

Status: 403 Forbidden

CodeErrorWhen
609ParticipationLockedErrorIf the participation is locked for the given campaign.

❗️

When a participant invites someone to your app, they will get rewarded after their friend completes your conversion event. This means, that the referrer-referral connection (the number of referrals they have) will be updated on your Dashboard after the conversion. The invitee, will also get their reward after they make a conversion.


Did this page help you?