Welcome to the Segment integration for the Modern Pricing API! You can use the Segment integration for Modern Pricing to access Modern Pricing API endpoints, which can provide information regarding the visitors to your website and their ability to afford your goods and services.
Page calls are the only type of call supported by Modern Pricing. Your Page calls must:
ip_addressin the context object. You may optionally provide the
user_agentparameter for more accurate scoring.
|ip_address||true||The ip address of the visitor you want to score.|
|user_agent||false||The software client acting on behalf of the visitor.|
The IP Address and User Agent are not automatically collected by Segment’s server-side libraries and you will need to manually grab these fields from the client and pass them to the server.
An example call would look like:
Page calls will be sent to Modern Pricing as a
pageview. If you haven’t had a chance to review our spec, please take a look to understand what the Page method does.
Modern Pricing recommends the following best practices to reduce unnecessary calls to their API that will count against your monthly usage.
For anonymous visitors:
if user_agent != bot
// Send Page call
For logged in visitors:
# == Schema Information
# Table name: users
# id :bigint(8)
# first_name :string
# last_name :string
# email :string
# modern_pricing_score :string
When you integrate Modern Pricing via Segment, Modern Pricing returns a postback Identify call to your source so that you’ll be able to easily pass the score to your downstream destinations.
How does it work?
Segment is then able to send the Modern Pricing score to the other destinations you have connected to your source.