Intelligems
Tag survey responses with the Intelligems experiment and test group each respondent saw
If you run A/B tests with Intelligems, you can record which test group each respondent was in alongside their survey response. That lets you compare how customers in each variant answered — for example, whether shoppers who saw a new product page layout report a different reason for buying than shoppers who saw the control.
The integration is a short snippet you add to your Shopify theme. Nothing needs to be turned on in Zigpoll or in Intelligems.
How it works
Intelligems puts a JavaScript object, window.igData, on every page it runs on. The snippet waits for Intelligems to load, reads the name of each experiment the visitor is in and the name of the test group they were assigned to, and hands them to Zigpoll in two ways:
Storefront surveys — it adds them to
window.Zigpoll.metadata, which Zigpoll saves with every answer.Checkout and thank-you page surveys — it saves them as hidden cart attributes starting with
_zigpoll_. Zigpoll's checkout extension copies those attributes onto the response.
Intelligems only reports the experiments that run on the page the visitor is currently viewing. A test that runs on product pages is invisible on the homepage or the thank-you page, so the snippet remembers each assignment in the visitor's browser and keeps sending it on later pages.
Each experiment becomes one metadata field named intelligems_ followed by the experiment name, and the value is the test group name:
PDP Hero Image
Lifestyle Photo
intelligems_pdp_hero_image: Lifestyle Photo
Free Shipping Threshold
Control Group
intelligems_free_shipping_threshold: Control Group
Setup
Step #1: Add the snippet to your theme
In Shopify, go to Online Store → Themes.
Next to your live theme, click ⋯ → Edit code.
Under Layout, open
theme.liquid.Paste the snippet below just above the closing
</head>tag, then click Save.
Step #2: Check that it's working
Open your store on a page where an Intelligems experiment is running. Intelligems preview links work too.
Open your browser's developer console and run
window.Zigpoll.metadata. You should see anintelligems_…field for each experiment you're in.Visit
/cart.json your store. Underattributesyou should see the same fields, starting with_zigpoll_intelligems_.Submit a test response and open it on the survey's Responses page. The
intelligems_…fields appear in the response's metadata.
Using the data
Once responses carry test group metadata, you can compare variants anywhere Zigpoll lets you filter by metadata:
Filter results by test group — on the Dashboard, Answers, or Charts page, click the filter icon, choose the
intelligems_…field under Custom, and pick a test group. Every tally and chart recalculates for that group. See Filtering results by metadata.Export — the fields are included as columns in CSV exports and Google Sheets syncs, so you can pivot answers by test group in your own tools.
Match to orders — post-purchase responses are already linked to their Shopify order, so you can line them up with Intelligems' own order export.
Which surveys are tagged
Surveys shown on your storefront
Yes
Checkout and thank-you page surveys
Yes, as long as the shopper visited a page with the snippet before checking out
Email, SMS, and survey link surveys
No — they are answered outside the shopper's browsing session
Surveys with Anonymous mode on
No — anonymous surveys don't store metadata
Good to know
Renaming an experiment in Intelligems starts a new metadata field, since the field name comes from the experiment name. Responses collected before the rename keep the old field.
Ended experiments stop being recorded 30 days after the visitor last saw them on a page where the experiment ran. To change that window, edit
MAX_AGEin the snippet.Testing in preview mode tags your own browser with the previewed group. To clear it, run
localStorage.removeItem('zigpoll_intelligems')in the console.Shoppers who skip your storefront, for example by following a direct checkout link, won't have a test group on their post-purchase response. Intelligems still adds its own
igTestGroupsattribute to the order, which holds the test group ID.
Last updated

