Home / Admin / custom smart tag full page example
Duplicate Snippet

Embed Snippet on Your Site

custom smart tag full page example

Code Preview
html
<!DOCTYPE html>
<html>
<head>
  <title>Page Title</title>
  <!--- Additional head elements go here -->
</head>
<body>
  <!-- Page content goes here -->
  <!-- This site is converting visitors into subscribers and customers with OptinMonster - https://optinmonster.com -->
  <script>
    (function (d, u, ac) {
      var s = d.createElement('script');
      s.type = 'text/javascript';
      s.src = 'https://a.omappapi.com/app/js/api.min.js';
      s.async = true;
      s.dataset.user = u;
      s.dataset.account = ac;
      d.getElementsByTagName('head')[0].appendChild(s);
    })(document, userid, accountid);
  </script>
  <!-- End of OptinMonster integration -->
  <script>
    document.addEventListener('om.Dtr.init', function (event) {
      console.log(event.detail.Dtr);
      console.log(event.detail.Campaign);
      // Registering a custom smart tag with a 'name' variable.
      event.detail.Dtr.setCustomVariable('name', 'Thomas');
    });
  </script>
</body>
</html>

Comments

Add a Comment