Macros
Our platform supports macros for call-to-action (CTA) links, allowing you to add dynamic values that automatically populate to streamline your workflow and make for a more personalised user experience.
A macro is a predefined placeholder or code that automatically expands to a specific value or set of values. In the context of your CTA links, a macro will dynamically insert information, making your links more personalised and functional without requiring manual updates.
Using macros in your CTA links is simple. Here’s how you can do it:
Identify the macro: Choose the appropriate macro from the list provided below.
Insert the macro: Add the macro code into your CTA link where you want the dynamic value to appear.
Save and preview: Save your changes and preview the CTA link to ensure the macro is correctly replaced with the intended value.
Macros can be used in any URL within your CTA links as query parameters.
By using macros, you can create more useful CTA links that automatically update with relevant information.
Here is a list of the macros you can use, along with descriptions of what they do:
%SESSION_UID%: Inserts the player session uid.
Example: https://example.com/profile?session=%SESSION_UID%
%APP_ID%: Inserts the current game ID.
Example: “https://example.com/events?game_id=%APP_ID%
By including these macros, you can ensure your CTA links are always up-to-date and personalised, enhancing user engagement and the overall experience.
To give you a better understanding, here are a few examples:
Before: “https://example.com/profile”
After: “https://example.com/profile?session=%SESSION_UID%”
This allows you to identify the unique session of each visitor through the CTA link.
Before: “https://example.com/newsletter”
After: “https://example.com/newsletter?game_id=%APP_ID%”
This allows you to attribute which visitors to the CTA link came from which game.
These examples show how macros can make your CTAs more relevant and can help you retrieve data from your application, from the targeted link.
The macro values, such as %SESSION_UID% and %APP_ID%, can be retrieved from the targeted link and then used to call our API to check the information of that user.
This enables you to dynamically fetch and display comprehensive user data based on the macro values, enabling a personalised and efficient user experience.
Note:
All macro data returned is processed using rawurlencode to ensure compatibility in URLs. This means special characters are encoded for safe use in links, preserving functionality while avoiding potential issues with reserved or unsafe characters. For example, a space will appear as %20, and special characters like & will be encoded as %26.
What is a macro?
A macro is a predefined placeholder or code that automatically expands to a specific value or set of values. In the context of your CTA links, a macro will dynamically insert information, making your links more personalised and functional without requiring manual updates.
How to use macros in CTA links
Using macros in your CTA links is simple. Here’s how you can do it:
Identify the macro: Choose the appropriate macro from the list provided below.
Insert the macro: Add the macro code into your CTA link where you want the dynamic value to appear.
Save and preview: Save your changes and preview the CTA link to ensure the macro is correctly replaced with the intended value.
Where can macros be used?
Macros can be used in any URL within your CTA links as query parameters.
By using macros, you can create more useful CTA links that automatically update with relevant information.
List of available macros
Here is a list of the macros you can use, along with descriptions of what they do:
%SESSION_UID%: Inserts the player session uid.
Example: https://example.com/profile?session=%SESSION_UID%
%APP_ID%: Inserts the current game ID.
Example: “https://example.com/events?game_id=%APP_ID%
By including these macros, you can ensure your CTA links are always up-to-date and personalised, enhancing user engagement and the overall experience.
Examples of Macros in Action
To give you a better understanding, here are a few examples:
Before: “https://example.com/profile”
After: “https://example.com/profile?session=%SESSION_UID%”
This allows you to identify the unique session of each visitor through the CTA link.
Before: “https://example.com/newsletter”
After: “https://example.com/newsletter?game_id=%APP_ID%”
This allows you to attribute which visitors to the CTA link came from which game.
These examples show how macros can make your CTAs more relevant and can help you retrieve data from your application, from the targeted link.
The macro values, such as %SESSION_UID% and %APP_ID%, can be retrieved from the targeted link and then used to call our API to check the information of that user.
This enables you to dynamically fetch and display comprehensive user data based on the macro values, enabling a personalised and efficient user experience.
Available Macros
Macro | Function |
---|---|
%SESSION_UID% | Returns the user's current session ID. |
%APP_ID% | Returns the APP ID of the current game being played. |
%ID_UNIC% | Returns the unique identifier for the user. |
%GENDER% | Returns the user's gender. |
%USERNAME% | Returns the user's username. |
%FIRSTNAME% | Returns the user's first name. |
%LASTNAME% | Returns the user's last name. |
%EMAIL% | Returns the user's email address. |
%PHONE_NUMBER% | Returns the user's phone number. |
%ADDRESS% | Returns the user's address. |
%ZIP_CODE% | Returns the user's zip code. |
%TOWN% | Returns the user's town. |
%COUNTRY% | Returns the user's country. |
%DOB% | Returns the user's date of birth in YYYY-MM-DD format. |
%COMPANY_NAME% | Returns the user's company name. |
%WEBSITE% | Returns the user's website. |
%PROFIL_UID% | Returns the unique identifier for the user's profile. |
%PROFIL_TITLE% | Returns the title of the user's profile. |
%PRIZE_UID% | Returns the unique identifier for the prize. |
%PRIZE_TITLE% | Returns the title of the prize. |
%PRIZE_REF% | Returns the reference of the prize. |
%PRIZE_CODE% | Returns the code associated with the prize. |
%OPTIN_NEWSLETTER% | Returns whether the user opted in for newsletters. |
%CUSTOM_TEXT% | Returns any custom text associated with the user. |
%CUSTOM_FORMAT% | Returns any custom format associated with the user. |
%SCORE% | Returns the user's score. |
%SELECT_VALUE% | Returns the first selected value. |
%SELECT_VALUE2% | Returns the second selected value. |
%CUSTOM_CHECKBOX% | Returns the custom checkbox value. |
%TIME_TAKEN% | Returns the time taken by the user in seconds. |
%LOCALE% | Returns the user's locale. |
Note:
All macro data returned is processed using rawurlencode to ensure compatibility in URLs. This means special characters are encoded for safe use in links, preserving functionality while avoiding potential issues with reserved or unsafe characters. For example, a space will appear as %20, and special characters like & will be encoded as %26.
Updated on: 15/11/2024
Thank you!