Oops! Facing network problem. Unable to load this page. Refresh

Please Wait...

Hello Guest

logo

FAQs

Help
Center

Developer API

Server-to-Server Event Tracking API

Learn how to securely send conversion, revenue, and custom business events from your server to SPRL using the Server-to-Server Event Tracking API.

Overview

The Server-to-Server (S2S) Event Tracking API allows your backend application to securely notify SPRL when important business events occur. Since events are sent directly from your server, tracking is more reliable and is not affected by browser limitations or ad blockers.

This API is ideal for tracking conversions, revenue, subscriptions, referrals, and other custom events generated by your applications.


Supported Events

Event Type Description
conversion Track completed conversions.
revenue Record revenue or sales generated from a short link.
custom_event Track custom business events.

Benefits

  • Secure server-to-server communication.
  • Not affected by browser restrictions or ad blockers.
  • Highly reliable event reporting.
  • Suitable for backend applications and automated systems.

Enable Event Tracking

  1. Navigate to Dashboard → Settings → Event Tracking.
  2. Click Enable Tracking.
  3. Your secure API Key will be generated.
  4. Copy and securely store the API Key.

Important: Never expose your API Key in frontend JavaScript or public applications.


API Endpoint

Method POST
Endpoint https://insprl.com/api/track/event
Content Type application/json

Required Parameters

Parameter Required Description
api_key Yes Your Event Tracking API Key.
url_slug Yes The short URL slug.
act_type Yes Supported values: conversion, revenue, custom_event.
timestamp Yes Current UNIX timestamp generated by your server.
event_value Required for revenue Revenue amount. Use 0 for other event types.
signature Yes HMAC SHA256 request signature.

Generate the Request Signature

Before sending a request, generate an HMAC SHA256 signature using the following payload format:

url_slug|act_type|event_value|timestamp

Sign the payload using your Event Tracking API Key.


Example Request

A request should include your API Key, event information, timestamp, and generated signature.

Refer to the Developer API documentation for complete request examples in your preferred programming language.


API Responses

HTTP Code Description
200 Request processed successfully.
400 Invalid request or missing parameters.
403 Authentication failed or invalid signature.
404 The specified short URL could not be found.

Common Errors

Error Possible Cause
Invalid request Missing or invalid parameters.
Invalid act type Unsupported event type.
Unauthorized Invalid or inactive API Key.
Plan not allowed Your subscription does not include Event Tracking.
Expired request The timestamp is outside the accepted time window.
Invalid signature The generated signature does not match the request.
Invalid URL The short URL does not exist or is not associated with your account.
Tracking disabled Event Tracking has not been enabled for your account.

Monitoring Events

After events are received successfully, you can monitor them from:

  • Dashboard → Analytics Controls → Final Numbers
  • Traffic Review
  • Conversion Rules

Important Rules

  • Available only on supported paid plans.
  • Works independently of wallet balance.
  • If Event Tracking is disabled, API requests are rejected.
  • Event Tracking requires Click Tracking to remain enabled.

Frequently Asked Questions

Can I send events directly from JavaScript?

No. Event Tracking should only be performed from your backend server to protect your API Key.

Does this replace click tracking?

No. Event Tracking complements click tracking by recording post-click business events such as conversions and revenue.

Can I track revenue values?

Yes. Revenue events should include the event value associated with the transaction.

Can I track custom business events?

Yes. Custom events can be reported using the supported event type.


Learn More
Continue with the API Rate Limits guide to understand request limits, usage quotas, and best practices for building reliable API integrations.
Tip
Always generate the request signature on your server using your secret API Key. Never expose your API Key or signature generation logic in client-side applications.

Need more help?

Our support team is always happy to assist you.

×

We use cookies to improve your experience, analyse traffic, and personalise content. By clicking “Accept”, you consent to the use of cookies as described in our Cookie Policy .

Accept cookies Read our Cookie Policy