Events API (server-to-server)
In complex use cases, where the user journey includes 3rd party platforms/applications (e.g. Telegram chatbot, Mobile Sandboxed WebApp, Discord, Telegram games), the best way to report on user engagement and conversion events is directly from your server to your Addressable account using a secure API.
Request Structure
The Addressable API has a request structured with the following fields:
An endpoint url: https://tag.adrsbl.io/events/prod_standard_stage/p.png
Three parameters:
is_conversion
Useis_conversion=true
, When you wish to designate an event as a conversion event for it to be recognized as such across all counters that track attributed conversions in our product. Useis_conversion=false
for all other events. Note: You can have multiple conversion events with this attribute set to true.data
data
is a base64-wrapped JSON parameter that contains event metadata according to the table below.
tid
Mandatory
String
Addressable pixel ID which can be found under 'Settings' in your Addressable account.
For associating events with your tenant
page_url
Mandatory
String
The page URL that generated the event can also be represented simply as a string.
For tracking users as they move between different pages of your website / funnel.
event_name
Mandatory
String
The name of the event as you’d like it to be displayed on our platform
For identifying user events that lead to actions
timestamp
Mandatory
Int
Timestamp of the event in UTC
Ability to filter by time
timezone_name
Mandatory
String
User reported timezone for time offset calculation. E.g America/New_York
Ability to filter by the user's time
timezone_offset
Mandatory
Int
The number of seconds in which the user timezone is offset from UTC time.
Ability to filter by the user's time
referrer
Optional
String
The page URL which referred to the page that generated the event. It may be an empty string.
For makreting channel drilldown, to understand where the traffic is coming from
address
Optional
String
The wallet address of the tracked user if known to you on the page where the event was triggered.
A wallet address is one of the identifiers used to track user events within your system. Addressable also enriches wallets with on-chain data, offering a comprehensive view of your users.
chain_id
Optional
String
If the blockchain ID is known to you on the page where the event was triggered, please specify it here. For example, for the Ethereum chain, send "0x1".
Ability to filter by blockchain and track user actions on various blockchains
extension_provider
Optional
String
Name of wallet provider if known to you when the event is triggered. E.g “MetaMask”.
The ability to filter by wallet provider is available on our interface.
properties
Optional
List of Jsons
See below for instructions on how to utilize the properties field.
Based on the table above, a request could be formulated in the following manner:
Requests sent to our servers must be URL-encoded. Refer to how URL encoding works for more detailed information.
Include"Content-Type": "application/json"
header in the request when sending it.
Request Headers Please use the following headers to pass user information to our servers. Refer to the table below:
Content-Type
Mandatory
application/json
For proper functioning of server-to-server API
Accept-Language
Optional
Use the original user's Accept-Language header and not your server's header
For drilldown and filtering based on user attributes: i.e languages
User-Agent
Optional
Use the original user's User-Agent header and not your server's header
For drilldown and filtering on user's OS type, Browser Type, Platform etc.
X-Forwarded-For
Mandatory
User original IP address
extract country information for each session. In compliance with GDPR and SOC2 regulations, IP addresses are retained for no more than one week. Country data, once extracted, is stored per user_id for your breakdown use.
X-Requested-With
Optional
User mobile referrer app
For drilldown and filtering - identification of the user orgin app before landed on your app (mobile referrer)
Event Properties
In the context of utilizing the Addressable Pixel, our software manages the definition of user sessions and user IDs. Conversely, the responsibility for managing S2S events lies with you.
To improve your comprehension of user behavior, make use of the properties
field to record key/value parameters that aid in understanding user behavior. This field comprises a list of JSON objects, where each key/value pair represents a specific property and its corresponding value.
Refer to the example below for guidance on accurate properties reporting:
In the example provided, three parameters were established. The first two parameters consist of both a name and a value, while the third parameter only includes a name.
Code Example
Please refer to the following Python code snippet demonstrating how to generate a request to our servers:
For technical assistance and troubleshooting, contact us at support@addressable.io
Last updated