Content Insights' tracking code automatically connects to the public APIs of social networks. This helps us ensure that the most recent information about activities on such networks is collected for each visited article. The matching is done on the URL level and the process is fully automatized.
At the moment, the following social networks are queried:
Using the different URL
By default, the URL set as a URL of the article will be used to query a social network's API.
If you want to specify a different URL, please set the social_url parameter of the _ain object.
Sending your own data about social actions
If you have your own information about social actions, and you don't want Content Insights' tracking code to query social networks' APIs, you can send them in a social parameter of the _ain object. Content Insights' tracking code will honor this parameter and it will not send any queries. This can be controlled per social network.
Example 1:
var _ain = {
...
social: {
fb_count: 35,
pn_count: 1,
ln_count: 2
},
...
};
In this case, you will tell our code that the most recent number of social actions for this article is 35 from Facebook, 1 from Pinterest and 2 from LinkedIn.
Example 2:
var _ain = {
...
social: {
pn_count: 0,
ln_count: 0
},
...
};
In this case, you will tell our code to check for Facebook social data on its own, but to ignore Pinterest and LinkedIn. This is useful if you don't care about these social networks.