Developer centerAPI keys

Page Plan

A Page Plan configures how the Intelligent Tag renders page content using familiar HTML constructs. The SDK handles HTTP networking, asynchronous cloud processing, and dynamic HTML rendering. It ensures optimal Intelligent Page implementations with minimal engineering effort.

Getting Started

  1. Insert the Intelligent Tag.
  2. Review the Intelligent Handshake® Plan and identify target HTML Elements.
  3. Choose an Implementation Mode (HTML Orchestration or JavaScript Callback).
  4. Define the Default Experience.
  5. Prepare the target HTML Elements.
  6. Create Intelligent Handshake® HTML Script Elements.
  7. Create the Page Plan Object.
  8. Start Manipulation Mode
  9. Test different user experiences with URL parameters.

Review the Intelligent Handshake® Plan

As the integration engineer, you’ll receive an Intelligent Handshake® Plan. This plan describes how to enhance the page experience while meeting business objectives.

  • Study the plan carefully to understand its goals.
  • Map each step of the plan to specific HTML elements on your site.
  • Visualize the full journey: the default state (before), the change (transition), and the personalized result (after).

This ensures that the intended user experience is implemented accurately and consistently.

Implementation Options

The SDK supports two rendering modes:

HTML Orchestration Mode

Declarative. Controlled entirely through the Page Plan Object. Recommended for most implementations.

JavaScript Callback Mode

Programmatic. Controlled by your custom callback. Use when you need flexibility (analytics, dynamic rendering, third-party integrations)

Both modes can be used together.

Define the Default Experience

The Internet isn’t always predictable. A well-defined Default Experience ensures that the page remains usable and positive in every scenario, even if network conditions or responses vary.

Two primary approaches can be mixed across multiple elements of a page:

Server Default Render

  • The server renders the default HTML as-is.
  • The Intelligent Tag does not alter these elements.

Manipulation Default Render

  • The server renders an empty placeholder or simple default markup.
  • The Intelligent Tag injects or replaces this content once score rendering is triggered.

Prepare the Target HTML Elements

Manipulation IDs

Each target element in the Intelligent Handshake® Plan must have a unique id. You can use existing IDs or add new ones as needed.

Visibility IDs

Both of the following can act as visibility triggers that start the rendering process when they first become visible in the viewport:

  • elementPlans.elementIDs — one or more target element IDs defined within each Element Plan.
  • triggerElementID — one or more optional additional element IDs at the Page Plan level.

When any one of these elements becomes visible, Intelligent Handshake® evaluates the user’s Score and begins rendering the appropriate experience.

Example

<div id="wrapper"></div>     <!-- optional PagePlan triggerElementID -->
<div id="offer"></div>     <!-- part of elementPlans.elementIDs -->

This design ensures you can control rendering based on either the primary elements you’re manipulating or a dedicated “trigger” element.

Create Intelligent Handshake® HTML Script Elements

A custom <script> type was created for defining manipulation experiences in native HTML:

Example

<script type="html/intelligenthandshake" id="IH_Hero_H" ...>
   ...
   <div>
      ...
   </div>
   ...
</script>

These elements are invisible to the browser but available to the SDK for orchestration. This lets developers design experiences using familiar HTML in their normal tools.

Create the Page Plan Object

The Page Plan Object links Intelligent Handshake® Scores to the experiences defined in HTML or code. It is a JavaScript configuration object that controls page rendering through the Intelligent Tag.

Page Plan Object Definition

Field Data Type Examples Description
actionKey String "0123a...XyZ==" ActionKey assigned by Intelligent Handshake.
triggerElementID String "wrapper" or ["wrapper1","wrapper2"] Optional. One or more additional element IDs that, when visible, trigger rendering. Can be a single string or an array of strings
triggerVisibilityThreshold Number 0.01 Optional. The proportion of the first visibility-trigger element that must be visible to trigger rendering (0.01 to 0.5).
onRender Entry point for Callback function SimpleShowScoreOverlay Optional callback. Enables JavaScript Callback Mode. onRender( PagePlan, Segment )
elementPlans Array of ElementPlan Objects [{...},...] Zero or more Element Plan objects.

Element Plan Object Definition

Field Data Type Examples Description
elementIDs Array of Strings ["id151841-409", "id151841-52"] Array of target element IDs.
fallbackMode String "None" Manipulation Mode for the Default Experience (Default is "None").
fallbackElementID Number null Optional ID of the default content.
segmentMap Array of Objects [{...},...] Array of objects defining Score-based manipulations.

HTML Score Object Definition

Field Data Type Examples Description
score String "H" Intelligent Handshake® Scores (e.g., "H").
mode String "Append" Manipulation mode for the experience (Append, Replace).
ElementID String IH_HERO_H ID of the HTML snippet (<script type="html/intelligenthandshake">).

Segment Object Definition

Field Data Type Examples Description
segmentCode String H Intelligent Handshake® Scores.
nominalIndex String 6 A unique numeric index identifying the score; the index does not imply an ordering.
quantitativeValue String 3.0 A relative value assigned to the score that can be used for comparison in certain cases.

Manipulation Modes

None - Do nothing
Append - Add manipulation content after existing HTML
Replace - Replace existing HTML with manipulation content

Example

<script type="text/javascript">
	theIntelligentHandshakePagePlan =
	{
		defaultTimeoutAfterLoad: 10,
		actionKey: "0123a...XyZ==",
		triggerElementID: "id517024-3232",
		triggerVisibilityThreshold: 0.01,
		onRender: SimpleShowScoreOverlay,
		elementPlans:
		[
			{
				selectors: ["id151841-409", "id151841-52"],
				fallbackMode: "None",
				fallbackElementID: null,
				segmentMap: [
					{
						score: "H",
						mode: "Append",
						ElementID: "IH_Hero_H"
					}
				]
			}
		]
	}



{
  "schema": "IH.PagePlan.v2",
  "planId": "string",
  "version": "string",
  "fallbackMode": "showOriginal | showFallbackElement | revealCurrentDom | noAction",
  "fallbackElementId": "string",
  "elements": [
    {
      "elementId": "string",
      "selectors": ["string"],
      "originalElementId": "string",
      "fallbackElementId": "string",
      "variantMap": {
        "H": "string",
        "M": "string",
        "L": "string",
        "N": "string",
        "R": "string",
        "U": "string"
      },
      "visibilityRule": "replace | showSelected | toggleVisibility | append"
    }
  ]
}



</script>

Start Manipulation Mode

The following snippet should be added after the theIntelligentHandshakePagePlan object is defined.

This snippet registers your Page Plan with the Intelligent Handshake SDK.

Example

<script type="text/javascript">
(function(p){(function c(k){if(window.intelligenthandshake?.ManipulationMode?.Start){intelligenthandshake.ManipulationMode.Start(p)}else if(k<100){setTimeout(()=>c(k+1),50)}})(0)})
(   theIntelligentHandshakePagePlan   );
</script>

Test the User Experience

You can test scenarios using query parameters on the Intelligent Tag URL.

Example

https://livesite.com/?ihscore=L
https://livesite.com/?ihscore=M
https://livesite.com/?ihscore=H
https://livesite.com/?ihscore=NB

https://livesite.com/?ihscore=H&ihmilliseconds=0
https://livesite.com/?ihscore=H&ihmilliseconds=300
https://livesite.com/?ihscore=H&ihmilliseconds=1000

These allow you to simulate different Intelligent Handshake® Scores and response times for end-to-end testing.

Summary

  • Use HTML Orchestration Mode for declarative, markup-based experiences.
  • Use JavaScript Callback Mode for full control.
  • Always define a Default Experience.
  • Test with query parameters to validate before launch.

Action API Integration

Use the ActionType catalog to choose the interaction. WebVisit (14) covers web visits; Disposition (19) records outcomes. The User Action API defines the shared submission contract.

Working Examples

Visit GlassBox Examples to compare basic Page Plan rendering with above-the-fold and below-the-fold FODC prevention. Each example includes observation notes and links to the relevant SDK documentation.