What Does the JavaScript Snippet Do?
Installing the JavaScript snippet ensures you'll be able to send click and pageview information from your site directly to your Lasso Analytics Reports..
The JavaScript snippet works with WordPress and non-WordPress sites.
🌵 NOTE: If you're using either the Lasso Lite or Lasso Pro plugins, you can skip this step. The JavaScript snippet is automatically included in your plugin.
Getting the Lasso JavaScript Snippet
First, you'll need to add your site to Lasso.
To do this, navigate to your Lasso Account Page and click the Add a new site button:
On the next page, you'll need to select Install Performance myself. Then, type in your URL and click Add site.
Once, that's done, a JavaScript snippet will appear.
You'll need to copy and paste the JavaScript snippet before your website’s closing </head>
tag.
How to Add the JavaScript Snippet to Your WordPress Site
If you're not familiar with JavaScript and are using WordPress, the Header Footer Code Manager plugin makes it super simple! (It's also free. 😎)
Once you've installed the Header Footer Code Manager plugin, all you need to do is:
Navigate to HFCM in your WordPress sidebar.
Click Add New Snippet.
Apply these settings:
Snippet Name: Performance
Snippet Type: Javascript
Site Display: Site Wide
Location: Header
Device Display: Show on All Devices
Status: Active
Paste the JavaScript from above.
Hit Save.
Lasso will automatically start tracking your clicks and views as soon as you hit Save. 🤓
However, if you use a caching plugin, you may need to clear the cache for the JavaScript to go into effect.
Is There an Alternative to Manually Adding the JavaScript Snippet?
Good news! If you use the Lasso plugin (Lite or Pro), you don't have to worry about adding a separate JavaScript snippet.
All you have to do is navigate to WordPress > Lasso > Settings. There, you'll see a section for Advanced Click Tracking.
Ensure the Page and Link-Level Tracking toggle is on, and Lasso will automatically send clicks and pageviews to your Performance Dashboard.
Is the JavaScript Snippet Mandatory?
You don't need to install the JavaScript Snippet if you want to use Lasso.
However, if you'd like to view click and view reports in Performance, you'll either need to install the JavaScript Snippet or use the Lasso plugin and enable click tracking.
Need Help?
If you have any questions, please click the chat bubble in the bottom right corner of this page or email us at [email protected]. We're here to help!