Metadata Site Script to collect leads from the Landing Page Form or Drift chat bot:
What does it do?
Metadata's Site Script grabs the information submitted by the user on the landing page form or Drift chatbot and sends it to the platform. The lead's information can be found in the Converted Lead table.
Metadata Site Script is designed to work only with landing pages of "Lead Generation" campaigns. The landing page should be set up within the Metadata's Campaign Wizard that includes field mapping. Email is the required field.
Before starting:
- Metadata Site Script will grab all fields from the form that got mapped in metadata landing page offer.
- For the landing page with Drift chatbot, Metadata Site Script will only grab the email address from the Drift chatbot as soon as a User enters it during the chatbot journey.
- Make sure that the Metadata Site Script is installed on the landing page with the form and it works properly. Without this step, the converted leads information will not get pushed to the platform.
- Our Metadata Site Script out of the box doesn't work with iframes as an iframe is technically a different website which doesn't know about the script on the current page and the metadata_cid which is in the URL parameter. Please reach out to support if you are using an iframe on your landing page and our team can recommend how to get it to work.
- Event pages such as Zoom, on24.com, calendly are not supported - A work around is to create a Lead Gen Form offer and have the thank you link directly to the event form.
How does it look?
You can copy the metadata tracking code below or on the Integration page.
Here is Metadata's tracking code for the landing page with the form or Drift chatbot:
<script>
(function(options) {
var s = document.createElement("script");
s.async = true;
s.src = "https://cdn.metadata.io/site-script.js";
s.onload = function() {
window.Metadata.siteScript.init(options);
};
document.head.appendChild(s);
})({});
</script>
How to embed it?
The Metadata tracking code should be embedded into the Landing page directly or via any Tag Manager across all pages or the specific landing page you plan to run Landing Page campaigns.
How to embed the Site Script into Google Tag Manager
Manually Trigger Metadata Site Script:
Depending on the landing page, in some scenarios, our Site Script can be manually triggered if a custom form is being used that is not triggering on submit.
- The site script will need to be inserted into the landing page and be present to trigger our API script which is contained inside the .js file.
- When testing the metadata_cid will need to be present in the URL. As a test, you can manually insert the metadata_cid into your URL for example: metadata.io/?metadata_cid=1234
- If you open the console and type "Metadata.siteScript" you can start interacting with the Site Script and submit the data that is entered via the form. For example, to send the data from a form you can use window.Metadata.siteScript.sendFormData(formEl) where formEl is form DOM element or if you have a raw data you can use:
window.Metadata.siteScript.sendData ({email: 'test@test.com'})
- window.Metadata.siteScript.getAllFields() is useful for debugging and will show you all the form fields on the page that site script is aware of.
Thank You Page Social Tracking Pixel:
What does it do?
For Landing Page campaigns, the conversion pixel needs to be placed on the thank you page after a lead converts so that conversions can be tracked in the Social channels. If there is no Thank You page, this pixel can be set up to fire from a form submission event in Google Tag Manager.
For further information on Thank you pixels please see this page
Help and Support: Please email support@metadata.io if you're running into any issues.
Comments
0 comments
Article is closed for comments.