Skip to main content

WordPress Integration

With CutMeShort Analytics, you can track lead and sale conversions on your WordPress site, enabling you to measure the effectiveness of your marketing campaigns. You can add the CutMeShort Analytics script to your WordPress website same way you would add Google Analytics script or any other JavaScript code.

Installation

Follow these steps to add the script to your site:
  1. On your WordPress dashboard, navigate to the Theme Editor section under the Appearance menu.
  2. Open the Theme Header (header.php) file on the right column.
  3. Paste the CutMeShort analytics script in the header area.
  4. Click on the Update File button to save the changes.
<script src="https://cut-me-short-public.s3.ap-south-1.amazonaws.com/dev/track_dev.js" defer></script>

Client-side Click Tracking

You can also set up the data-domain property to enable client-side click-tracking for your campaigns.
<script
  src="https://cut-me-short-public.s3.ap-south-1.amazonaws.com/dev/track_dev.js"
  defer
  data-domain="yourdomain"
></script>
Replace yourcompany.link with your referral link domain on CutMeShort.

Verification

You can verify the installation with the following tests:
  1. Open the browser console and type in window._cms – if the script is installed correctly, you should see the CMS tracking object in the console.
  2. Add the ?cms_id=test query parameter to your website URL and make sure that the tracking cookie is being set in your browser.
If both of these checks pass, the script is installed correctly. Otherwise, please make sure:
  • The analytics script was added to the <head> section of the page
  • If you’re using a content delivery network (CDN), make sure to purge any cached content

Configuration Options

You can pass the following props to the CutMeShort Analytics script to customize its behavior:

data-api-host

Type: URL
Default: https://www.cutmeshort.com
The base URL for the CutMeShort API. This is useful for setting up reverse proxies to avoid adblockers.

data-domain

Type: string Configure the domains that CutMeShort will track.