Kynetx vs Site Tags plugin - How can I tell the difference?

My application has a homepage where you can download and install plugins. It also uses site tags to invoke the same set of rules to show potential users what the application is doing.

I would like to hide the plugins and replace this div with what says "Thanks for installing the plugin." How can I tell the difference between a KRL called from site tags and a KRL called from a plugin?

Here are my ideas, but maybe there is a better way?

Option 1: use the page parameter, the plugin may not see it. Option 2: use the second rule set that invokes my main rule set. The plugin rule set will hide the plugin div and display the thank you div. I just have to have a basic set of rules that supports explicit events.

+3
source share
1 answer

I think your best option is to use the page parameter as you said. This will only be sent to a set of rules from your site tags, and not from browser extensions to solve your problem. Your site’s tags will look something like this:

<script type="text/javascript">
  var KOBJ_config = {
    "rids" : ["a999x99"]
    "called_from_site_tags" : "true"
  };
</script>
<script type="text/javascript" src="http://init.kobj.net/js/shared/kobj-static.js">
</script>

Then in your application you just need to check page:paramand do with it everything you need:

is_site_tags = page:param("called_from_site_tags");

See here in the docs for more details . Hope this helps!

+3
source

Source: https://habr.com/ru/post/1782978/


All Articles