LogoLogo
  • LeadBoxer — Lead Data Platform —Documentation
  • 🛠️Getting Started
  • Lead Management Workflow
    • Cold outbound email campaigns
  • How does it all work?
  • 🏗️Fundamentals
    • Leads & Accounts
      • Lead card: Complete lead details in one page
      • Batch operations
    • LeadBoard
    • Reports
    • Definitions & Glossary
    • Elements
      • Filters
      • Segments
      • Workflow Automation
      • Notifications
      • Users
      • Datasets
      • Clients (agents)
      • Lists
      • Enrichment
      • Leadscore
      • Lead & Account Tags
      • Import & Export
        • Upload Leads
        • download data
        • LinkedIn Matched Audiences export
        • Custom Properties
        • LeadBoxer User Interface Placeholder Names
      • Roles & Permissions
  • 🧩Integrations
    • 🌐Website
      • Lead Tracking Pixel
      • WordPress plug-in
        • track my WordPress user logins?
      • Google Tag Manager (GTM)
      • Drupal module
      • Gravity Form Tracking
      • Change website content based on behaviour
      • Track meta data using JSON-LD
      • Cross device tracking
      • Tracking marketing campaign data (UTM tags)
      • UTM tags for Google Adwords
      • How to track user logins
      • Automatic form tracking
      • Manual form tracking
      • How to get (raw) lead data
      • Magento
      • Adobe Tag Manager
      • Unbounce landing pages
      • Tracking pixel into Wix
    • ✉️Email
      • Individual emails
        • Gmail Email tracking
        • G Suite email tracking
        • Official Outlook Add-in
        • Advanced Outlook Add-in
        • Manually Identify leads using email
        • Legacy Outlook plugin
        • Linkedin InMail or Invite Link Tracking
      • marketing emails
        • 1. Setup Tracking Pixel
        • 2. Track Email Opens
        • 3. Track Email Clicks
        • Mailchimp
        • HubSpot
        • Sharpspring
        • ActiveCampaign
        • Pipedrive Campaigns
        • Eloqua
        • Copernica
        • Intercom
        • Mailup
        • Brevo
        • Poppulo
        • Reply.io
        • Spotler mail+
        • Prospect.io
        • Woodpecker
        • Instantly
        • Mailerlite
        • Lemlist
        • Autopilot
        • Constant Contact
        • dotdigital
        • Apollo.io
        • LaPosta
        • Customer.io
        • Campaign Monitor
        • QuickMail
        • Outreach
        • Mail Merge (MS Word)
    • Other
      • Active Campaign
      • HubSpot
      • Marketo
      • LinkedIn
        • LinkedIn job titles search
      • Google Places
      • Calendly
      • How to get LeadBoxer data into Intercom
      • Zapier
        • Advanced Zapier usage
        • Zapier webhook
        • Connect Leadboxer to Pipedrive with Zapier
        • Connect Leadboxer to Slack with Zapier
        • Connect Leadboxer to Salesforce with Zapier
      • Pipedrive
        • Pipedrive Workflow Automation with LeadBoxer
      • Whatagraph
      • Google BigQuery
      • Single Sign On (SSO)
  • 🦮Guides
    • Creating your first Segment
    • Creating your first LeadBoard
    • How to add a user
    • How to upload a List (ABM)
    • How to add a datasets
    • How to create a notification
    • How to set your Leadscore
    • How to hide & unhide Leads
    • Filter Leads from ad campaigns
    • How to create a Workflow Automation
    • How to mask IP addresses
  • 🏆Solutions
    • Lead Identification
    • Lead Qualification
    • Lead Managment
  • Extras
    • Changelog
    • Email tracking info
    • linkedIn industries
    • LeadBoxer reseller getting started
    • How to contact leads
    • LeadBoxer cookies
  • Terms of Service
  • Privacy Policy
Powered by GitBook
On this page

Was this helpful?

  1. Integrations
  2. Website

Track meta data using JSON-LD

PreviousChange website content based on behaviourNextCross device tracking

Last updated 2 years ago

Was this helpful?

What is JSON-LD?

When you use , you are following open standards and schemas, and your metadata is included in a script tag. This metadata can also be used by other services (such as Google, ).

If you would like to capture specific JSON-LD metadata information on your webpages and add these to the profile of your leads or customers, you can do so with the following example

Make sure you read first about how you can add properties to a lead/customer on page-load as we basically build on top of that feature.

Example

Here is an example JSON-LD snippet:

<script type="application/ld+json">{
    "@context": "https://schema.org",
    "@type": "NewsArticle",
    "url": "https://mysite.com/my-article",
    "creator": "Brad Shaw",
    "keywords": [
        "IFS",
        "Partner Zone",
        "Analytics planning and data analysis",
        "Cloud ERP financials and supply chain",
        "Connected manufacturing",
        "Digital enterprise in the real world",
        "Audio"
    ],
    "headline": "My Headline",
    "name": "My name",
    "description": "desc",
    "datePublished": "2021-06-22T03:35:20-0700",
    "isAccessibleForFree": "True",
    "dateModified": "2021-06-22T03:45:24-0700",
    "articleSection": "ABC"
}</script>

Now to capture specific items on page load from above example, you can use javascript to pass this to LeadBoxer. We've included some real-life logic in below example for when fields are not populated, empty, not defined, etc.:

function ot_onload() {
  // https://stackoverflow.com/questions/38602543/is-there-a-way-to-access-json-ld-via-javascript-if-it-doesnt-have-an-id

  var jsonld = JSON.parse(document.querySelector('script[type="application/ld+json"]').innerText);
  if (typeof jsonld !== 'undefined') {
    var articleSection  = jsonld.articleSection;
    var creator = jsonld.creator; 
    var datePublished;
    if (typeof jsonld.datePublished !== 'undefined')
      datePublished = jsonld.datePublished.substr(0, jsonld.datePublished.indexOf('T'));;

    if (typeof articleSection !== 'undefined') {
//      console.log("got articleSection: " + articleSection); 
      ot_map.put("lb_articleSection", articleSection);
    } else {
//      console.log("got articleSection: undefined");
      ot_map.put("lb_articleSection", "undefined");
    }
    if (typeof creator !== 'undefined') {
//      console.log("got creator: " + creator);
      ot_map.put("lb_creator", creator);
    } else {
      ot_map.put("lb_creator", "undefined");
    }
    if (typeof datePublished !== 'undefined') {
      ot_map.put("lb_datePublished", datePublished);
    } else {
      ot_map.put("lb_datePublished", "undefined");
    }
    ot_map.put("lb_topTitles", document.title + "|" + ot_map.get("lb_datePublished") + "|" + ot_map.get("lb_articleSection") );
//    console.log(ot_map.get("lb_topTitles"));
  }

  // load and log the state of all variables
  ot_log_state();
}

Still need help? Contact Us

Last updated on July 7, 2021

🧩
🌐
Json-ld
for enhanced display in search listings