Deploy manually
HUMAN recommends deploying Page Intelligence through a tag manager, such as Google Tag Manager. Manual deployment, and especially client-side HUMAN response decryption, can expose the IVT detection logic.
Deploy Page Intelligence manually when you add the detection tag directly to your landing page header. Review the integration options guide before you begin.
Prerequisites
Before you deploy Page Intelligence manually, ensure you meet the following requirements:
- You have access to your landing page code.
- You have a Page Intelligence tag and regex pattern from HUMAN.
Deploy the Page Intelligence tag
To deploy the Page Intelligence tag manually, add the script tag from HUMAN directly to the header section of the page.
For example:
Decrypt the IVT response
To manually decrypt and store the HUMAN IVT response:
- Create a global JavaScript object that runs before the Page Intelligence tag executes. This object acts as an event handler when the Page Intelligence tag returns an IVT response.
- Include the object’s name when you invoke the Page Intelligence tag in the
data-pgi-dis-holdtag attribute. - Inside the object, define a callback method called
dispatchthat receives the encrypted IVT response as an argument. - Inside the
dispatchmethod, decrypt the IVT response by matching it with the regex key HUMAN provided. - Optionally, based on the decrypted IVT response, invoke additional logic such as ad serving, blocking, or reporting.
For example:
In the example above:
- The global object is
window.hmnsPgiEvent. - You pass the object’s name to the Page Intelligence script in the
data-pgi-dis-holdtag attribute. - The required
dispatchcallback method includes:- The regex key HUMAN provided.
- Regex pattern matching:
- If the pattern matches the response, classify the traffic as valid (not IVT).
- If the pattern does not match the response, classify the traffic as invalid (IVT).
- The match result, a boolean value, is negated and stored in the constant
hmnsIvtDec. WhenhmnsIvtDecistrue, the traffic is IVT. WhenhmnsIvtDecisfalse, the traffic is not IVT. Note the inverted logic compared to the regex pattern matching above.
Use the hmnsIvtDec variable to trigger additional workflows as needed (see Mitigation strategy).