Skip to main content

Surveys Script Integration

The Script Integration lets you embed the Prime Earn survey wall directly into your page using a small JavaScript snippet. Compared to the IFrame Integration, this approach gives the widget tighter visual integration with your page — it renders inside any container element you specify rather than inside a separate frame.
Already using the Offers Script Integration? The setup is identical — just replace "offers" with "surveys" in the module field and point your container to the surveys <div>.

Step 1 — Add a Container Element

Add an empty <div> anywhere on your page where you want the survey wall to appear. Give it an id so the script can find it.
You can name the id anything you like. Set the height and width to match your layout.

Step 2 — Add the Script Snippet

Paste this snippet on the same page, anywhere after the container div (or in a <head> script that runs after DOM ready).
Replace YOUR_APP_ID with your Publisher App ID from the Prime Earn dashboard, and USER_UNIQUE_ID with the current user’s unique identifier in your system.
Never hardcode a real user ID as a string literal. Always inject it server-side or from your authentication context so each user sees their own personalised survey list.

Step 3 — Configure Parameters

All configuration goes inside window.psConfig. The table below covers everything a publisher needs to set up and run the integration correctly.

Required

User Attributes

Source & Network ID Reference

Localisation & Currency


Step 4 — Customize the Design

You can override the widget’s colors and visual style using the customAppDesign object. Pass any CSS variable overrides you want to apply:
Contact your account manager to get the full list of available CSS variables for your integration.

Full Example