How to remove the Insights tracking script

It's easy to remove the existing script once it's implemented. Here's how.

When the contract period expires, the client will have to remove the Insights tracking script.

Depending on the implementation method, there are three ways to remove the script.

1. Custom tracking implementation

Web developers have to remove this JavaScript code from the article page source:

<script type="text/javascript">
var _ain = {
id: "",
postid: "",
maincontent: "",
title: "",
pubdate: "",
authors: "",
sections: "",
tags: "",
access_level: "",
article_type: "",
reader_type: ""
(function (d, s) {
var sf = d.createElement(s);
sf.type = 'text/javascript';
sf.async = true;
sf.src = (('https:' == d.location.protocol)
? ''
: '') + '/stf.js';
var t = d.getElementsByTagName(s)[0];
t.parentNode.insertBefore(sf, t);
})(document, 'script');

It is probably in some page template of the used CMS or a framework that powers the site.

If the website uses infinite scroll or it's powered by a single-page application (SPA), it may look a bit different than the example above. Please refer to this article for more details.

2. Google Tag Manager implementation

If the Insights tracker was implemented using GTM, please open the GTM container and for associated tags, variables, and triggers used for this purpose.

You can delete all of them, or just disable the trigger, in case the tracker is needed again after some period.

We always advise exporting the settings in case the client uses our product again.

Please refer to this manual for additional details on exporting the GTM container:

3. WordPress plugin implementation

Some clients with websites powered by WordPress have active Content Insights plugin.

Someone with Administrator access has to uninstall the plugin or disable it in case the service is going to be used again after some period.

Remove Additional Features

There are several additional features that may be used along the smartocto Insights tracker.

Here's how to remove each one of them.

AMP tracking

If the Insights script is implemented on AMP pages, please check the AMP template and remove the script. Since there are two possible methods, please refer to this document for more details.

When AMP tracking is implemented through the GTM, please disable or completely remove all associated tags, variables, and triggers that enable insights tracking.

FIA tracking

Please remove the Insights script from the FIA template or a feed where it's implemented.

Please refer to this document for more details.

Conversion tracking

If conversion tracking is implemented, web developers have to remove the script from the pages where each tracked conversion occurs.

For example, it may be implemented on a Thank-You page, after the subscription is purchased.

In this case, look for the _ain.pushConversion() method and remove all associated calls to it.

Please refer to this document for more details.

Mobile app tracking

This is probably the most complex feature and it requires more effort to remove the smartocto insights tracking.

Tracking the content from the mobile applications (Android, iOS, or React Native) can be implemented in two ways: custom tracking, or by implementing our SDKs.

With that in mind, mobile app developers will know how to remove it.

Please refer to this document for more details.

If you have any troubles removing the scripts or SDK, feel free to contact our Support team.