Install TripLink Script

Follow these instructions to install the TripLink script on your website. Replace <your-affiliate-id> and <campaign-id> with your actual affiliate ID and campaign ID.

General Instructions for Any Website

Open the HTML file where you want to install the script and add the following script inside the <head> section:


<script type="text/javascript">
  var TRIPLINK_AID = "<your-affiliate-id>"
  var TRIPLINK_CAMPAIGN = "<campaign-id>"

  window.triplink_aid = TRIPLINK_AID
  window.triplink_cid = TRIPLINK_CAMPAIGN
  var script = document.createElement("script")
  script.setAttribute("src", "https://cdn.tripl.ink/sdk/js/latest.min.js")
  script.setAttribute("async", true)
  document.head.appendChild(script)
</script>

Instructions for React Applications

Open the main entry file (usually index.html in thepublic folder) and add the script inside the <head> section of the HTML file:


<!-- public/index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>React App</title>
  <script type="text/javascript">
    var TRIPLINK_AID = "<your-affiliate-id>"
    var TRIPLINK_CAMPAIGN = "<campaign-id>"

    window.triplink_aid = TRIPLINK_AID
    window.triplink_cid = TRIPLINK_CAMPAIGN
    var script = document.createElement("script")
    script.setAttribute("src", "https://cdn.tripl.ink/sdk/web/latest.min.js")
    script.setAttribute("async", true)
    document.head.appendChild(script)
  </script>
</head>
<body>
  <div id="root"></div>
</body>
</html>

Instructions for WordPress

To add the script to your WordPress site, you can use the theme'sheader.php file or a plugin to add custom scripts to the<head> section:


<!-- header.php -->
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
  <meta charset="<?php bloginfo('charset'); ?>">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <?php wp_head(); ?>
  <script type="text/javascript">
    var TRIPLINK_AID = "<your-affiliate-id>"
    var TRIPLINK_CAMPAIGN = "<campaign-id>"

    window.triplink_aid = TRIPLINK_AID
    window.triplink_cid = TRIPLINK_CAMPAIGN
    var script = document.createElement("script")
    script.setAttribute("src", "https://cdn.tripl.ink/sdk/web/latest.min.js")
    script.setAttribute("async", true)
    document.head.appendChild(script)
  </script>
</head>
<body <?php body_class(); ?>>
  <!-- Rest of your theme's HTML -->

Instructions for Other Popular Site Builders

Here are instructions for some other popular site builders/hosting platforms:

Wix

Go to your Wix dashboard and navigate to Settings > Tracking & Analytics. Click New Tool and select Custom. Paste the script code and set it to load in the <head> section of all pages.

Squarespace

In your Squarespace dashboard, go to Settings > Advanced > Code Injection. Add the script to the HEADER section.

Shopify

In your Shopify admin, go to Online Store > Themes > Actions > Edit Code. Open the theme.liquid file and add the script inside the <head> section.