Learn how to send your Hardal analytics data to Insider API using Custom API connections
This guide explains how to integrate Hardal Analytics with Insider’s API using Hardal’s Custom API connections. By setting up this integration, you can automatically send user events, attributes, and other analytics data collected through Hardal directly to Insider’s Unified Customer Database (UCD).
This integration uses Insider’s Upsert User Data API, which allows you to send both user attributes and events from Hardal, enabling seamless data synchronization between platforms.
Before setting up the integration, ensure you have:
A Hardal account with tracking implemented on your website or application
Access to Hardal’s Marketing Destinations section
An Insider account with API access
API credentials from Insider:
Partner Name (visible on the dropdown menu next to your username)
Request Token (API key) from Insider’s Integration Settings
Access Marketing Destinations
Log into your Hardal dashboard
Navigate to “Connections”
Click “Add Destination”
Select Custom API Template
From the template options, select “Custom API”
Click “Create” to begin configuring the connection
Configure Basic Connection Settings
Set up the following basic connection parameters:
Setting | Value |
---|---|
Endpoint Label | Insider Integration |
Endpoint ID | insider-integration |
Endpoint URL | https://unification.useinsider.com/api/user/v1/upsert |
Request Method | POST |
Content Type | application/json |
Add Authentication Headers
Configure the required headers for Insider API authentication:
Make sure to use your actual Insider partner name (in lowercase) and API token. The partner name can be found in the dropdown next to your username on the Insider dashboard, and the API token can be generated in Integration Settings.
Configure Request Format
Set up the request format to properly map Hardal data to Insider’s expected format:
The above format uses Hardal variables (enclosed in ##
) that will be automatically populated with data from your events. You can customize this mapping based on your specific data structure.
Set Up Event Conditions (Optional)
You can set up conditions to control which events are sent to Insider:
Click on “Add Condition”
Select the condition type (e.g., “Event Name”)
Choose the operator (e.g., “equals”, “contains”)
Enter the value (e.g., “purchase” to only send purchase events)
You can create multiple connections with different conditions to send different types of events with customized formats.
Test the Connection
Click the “Test Endpoint” button to validate your configuration
Check the response to ensure it’s successful
If you receive any errors, adjust your configuration and test again
Save and Activate
Once testing is successful, click “Save” to create the connection
Toggle the connection to “Active” to start sending data
Insider’s API requires specific formatting for different event types. Below are examples for common events:
For purchase events, you need to include additional parameters like event_group_id
and unit_sale_price
:
For user registration events:
When sending purchase events to Insider, ensure these parameters are included:
event_group_id
: Required for purchase events (typically an order ID)
unit_sale_price
: Required for purchase events (the price after discounts)
currency
: Required for purchase events (in ISO 4217 format, e.g., “USD”)
Insider requires timestamps in RFC 3339 format. Hardal’s ##created_at##
variable outputs in this format, but if you’re manipulating dates, ensure they follow this pattern: YYYY-MM-DDThh:mm:ssZ
or with timezone offset YYYY-MM-DDThh:mm:ss±hh:mm
.
By default, when sending array attributes for a user, Insider adds new values to existing ones. If you want to replace array attributes instead of appending, add "not_append": true
to your request:
Authentication Errors
If you receive a 403 Forbidden response:
Verify your X-PARTNER-NAME is in lowercase
Check that your X-REQUEST-TOKEN is correct
Ensure your IP address is whitelisted if IP restrictions are enabled
Missing Required Parameters
If you receive errors about missing parameters:
For purchase events, ensure event_group_id
, unit_sale_price
, and currency
are included
Verify that at least one valid identifier is present (email, phone, or UUID)
Check that event timestamps are in the correct format
Rate Limiting
If you receive a “too many requests” error:
Insider limits to 25,000 requests per minute
Add throttling logic to your integration
Consider batching events (up to 1,000 users per request)
Invalid Data Format
If you receive errors about invalid data:
Ensure email addresses are in valid format
Phone numbers must be in E.164 format (e.g., +1234567890)
Check that numerical values are sent as numbers, not strings
Here’s a complete example of a Custom API configuration for sending both user attributes and purchase events to Insider:
When working with the Hardal Custom API, the variable placeholders (like ##user.email##
) will be automatically replaced with the actual values when an event is processed. Make sure all variable references match the exact names of your Hardal attributes and properties.
Start with critical events: Begin by sending high-value events like purchases and registrations before expanding to other event types.
Monitor data quality: Regularly check both Hardal and Insider dashboards to ensure data is flowing correctly.
Use skip_hook for historical data: When sending historical data, set skip_hook: true
to prevent triggering current journeys.
Batch users efficiently: Each request can include up to 1,000 users, but keep request size under 5MB.
Handle errors properly: Implement proper error logging and retry mechanisms for failed requests.
Test thoroughly: Always test your connection with various event types before fully deploying.
Maintain data consistency: Ensure identifiers and event parameters are consistent across platforms.