Segmentify Integration
Connect Hardal analytics to Segmentify for advanced personalization
Segmentify Integration
Overview
This guide explains how to integrate Hardal analytics with Segmentify using Hardal’s Custom API destination feature. By connecting these platforms, you can use your first-party data collected through Hardal to power Segmentify’s personalization engine for product recommendations, search optimization, and engagement campaigns.
Prerequisites
Before setting up the integration, ensure you have:
-
An active Hardal account with tracking set up on your website
-
An active Segmentify account with API access
-
Your Segmentify API Key and Data Center URL
-
Basic understanding of both platforms and JSON
Proper integration requires admin access to both platforms. Make sure you have the necessary permissions before beginning.
Understanding Segmentify API Requirements
Segmentify uses a RESTful API that accepts various event types to track user behavior and personalize content. Key concepts to understand:
Segmentify Event Types
Event Name | Description | Segmentify Event Type |
---|---|---|
Page View | When a user views a page | PAGE_VIEW |
Product View | When a user views a product | PRODUCT_VIEW |
Basket Operations | Adding/removing products from basket | BASKET_OPERATIONS |
Checkout | Various checkout steps | CHECKOUT |
User Operations | User login, signup, etc. | USER_OPERATIONS |
Custom Event | Any custom user action | CUSTOM_EVENT |
Authentication Requirements
Segmentify requires an API key and specific headers for authentication:
-
API Key (included as a query parameter)
-
Content-Type: application/json
-
Accept: application/json
-
Origin: Your domain
Setting Up Custom API Destination in Hardal
Access Marketing Destinations
-
Log into your Hardal dashboard
-
Navigate to Connections
-
Click “Add Destination”
-
Select “Custom API” from the template options
Configure Base Settings
Configure the basic destination settings:
Replace [YOUR-DATA-CENTER]
and [YOUR-API-KEY]
with your actual Segmentify data center URL and API key. You can find these values in your Segmentify account under Settings > Integrations.
Add Required Headers
Configure the headers required by Segmentify:
Replace https://yourdomain.com
with your actual website domain.
Mapping Hardal Events to Segmentify Format
The most important part of the integration is correctly mapping Hardal events to the expected Segmentify format. Segmentify expects an array of events in its request body.
Create a separate API destination for each event type you want to track in Segmentify to keep your configuration clean and organized.
Mapping Page View Events
Create Event Mapping
Configure the request format for page view events:
This maps Hardal’s variables (marked with ##variable##
) to Segmentify’s expected format.
Set Up Condition
Add a condition to trigger this mapping only for page view events:
-
In the “Conditions” section, click “Add Condition”
-
Set “Event Name” equals “page_view”
Make sure your Hardal implementation is sending the appropriate page category values with your page view events. Common values include “Home Page”, “Product Page”, “Category Page”, etc.
Mapping Product View Events
Product views are crucial for Segmentify’s recommendation engine.
Create Event Mapping
Configure the request format for product view events:
Set Up Condition
Add a condition where “Event Name” equals “product_view”.
Mapping Add to Cart Events
For basket operations like adding products to cart:
Create Event Mapping
Set Up Condition
Add a condition where “Event Name” equals “add_to_cart”.
Mapping Remove from Cart Events
For basket operations like removing products from cart:
Create Event Mapping
Set Up Condition
Add a condition where “Event Name” equals “remove_from_cart”.
Mapping Checkout Events
Checkout events in Segmentify track the conversion funnel with multiple steps.
Mapping User Operations
User operations help Segmentify personalize experiences based on user identity.
Testing the Integration
Validate Configuration
Before activating your integration, validate your configuration:
-
Wait a while for Hardal to send some events
-
Check Segmentify for events received
Monitor Events in Segmentify
-
Log into your Segmentify dashboard
-
Check the “Real-time Events” section
-
Verify that events from Hardal are being received correctly
Test Full Conversion Flow
Conduct a complete test from page view through purchase:
-
Browse your website while monitoring events
-
View a product
-
Add it to cart
-
Complete a test purchase
-
Verify each step is tracked in Segmentify
Enable the Integration
Once testing is successful:
-
Return to your Hardal Custom API destination settings
-
Click “Save Changes”
-
Monitor the event flow for a few days to ensure stability
Troubleshooting
Best Practices
Data Consistency
Maintain consistent data formats between Hardal and Segmentify:
-
Use the same product IDs across all platforms
-
Ensure category hierarchies match between systems
-
Use consistent naming conventions for user attributes
Performance Optimization
-
Group related events to minimize API calls
-
Implement proper error handling
-
Consider using batch processing for high-volume events
Security Considerations
Never expose your Segmentify API key in client-side code. The Hardal server-side integration ensures your key remains secure.
-
Regularly rotate your API keys
-
Implement IP restrictions if possible
-
Only send necessary data to minimize privacy concerns
Resources
Was this page helpful?