Integrations / API

Report callbacks

  • Applies to:
  • Premium
  • Enterprise

Haystack can make a callback to your own application when our analysis is completed, with a payload of the report data. A callback is where Haystack sends data to your web server, which you can process as you wish. This may be useful for an number of reasons:

  • Save Haystack’s data into your own database or CRM
  • Create an automatic follow-up action, e.g. email the customer or add them to a mailing list

You can get a callback instantly for the following events:

Callback from API initiated report

See: Report API

Callback from inbound tool report

You can pass a callback URL with each report by adding a hidden field to your landing page, labeled onCompletion. This field should be set to the URL of your callback handler. As the onCompletion field is publicly viewable on the landing page, you may wish to add a unique token to each URL for security.

Alternatively, you can speak to your Digital Account Manager who can set an account-wide callback for all inbound tool reports.

Callback for all reports

Speak to your Digital Account Manager who can add a callback for all reports ran in your Haystack account.

Data format

The data will be POSTed to the URL of your choice as JSON.

The exact data you receive will depend on your account configuration (e.g. tests enabled and country of operation) but an example for your reference is included below:

      "detected_phone":"+44 1322 460460",
      "detected_address":"Silktide LTD, Brunel Parkway, Pride Park, DE24 8HR, United Kingdom, United Kingdom",
      "analytics_tool":"Google Analytics"
      "homepage_title_tag":"Silktide - making the web a better place",
      "homepage_meta_description":"Helping to make the web a better place.",
  • Was this helpful?
  • Yes   No