Query Parameters
How to pass information into Spara via query parameters.
Spara can ingest any query parameter on any webpage that loads a Spara Chat agents. This is true at any point that Spara is loaded; the query parameters can be added even after Spara is instantiated.
Step 1: Add query parameters to URLs
Add query parameters to the URL of any webpage that loads Spara Chat agents.
For example, let's say that ACME's sales journey is...
Leads submit a webform at acme.com/form. This form includes fields for first name and email address.
Upon form submission, the lead is redirected to acme.com/chat, which loads the Spara Fullscreen interface.
The correct way to handle this redirect is by including URL-encoded query parameters for form fields first name and email address:
https://acme.com/chat?FirstName=John&Email=john%40company.com
Spara Fullscreen is then loaded already knowing the lead's first name and email address.
Step 2: Map query parameters
Spara automatically maps the standard marketing UTM parameters to Spara fields:
utm_campaignutm_sourceutm_mediumutm_campaignutm_termutm_content
All other query parameters must be mapped to Spara fields. This is how Spara knows which query parameters are relevant and what they mean.
Navigate to Chat > Configuration
Click "Add Field +" to add a new mapping
In "Your field," type in the exact query parameter key
In "Spara field," select or add the field

How do Spara fields work?
Some notes on how Spara fields work:
Fields are persisted across all user sessions.
Each field may only have a single value.
Any field may be overwritten at any time. Fields are never deleted or overwritten by
nullornone.
For example, consider the following scenario in which Spara is loaded on every acme.com webpage:
Anonymous Lead 123 visits
acme.com?utm_campaign=twitterand talks to Spara. Throughout the conversation, Lead 123 navigates to multipleacme.comwebpages.24 hours later….Anonymous Lead 123 visits
acme.com/pricing?utm_source=google. They do not talk to Spara.6 days later…Anonymous Lead 123 visits
acme.com?utm_campaign=linkedin. They talk to Spara.
After all three sessions, Anonymous Lead 123 has the following fields set in Spara's database:
utm_campaign=linkedinutm_source=google
Note that utm_campaign=twitter was set in at the start of the first session, but then overwritten to utm_campgin=linkedin by the third session.
Last updated