Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

krl

My application has a homepage where you can download and install the plugins. It also uses site tags to call the same ruleset to show potential users what the app does.

I'd like to hide the plugins and replace that div with one that says 'Thanks for installing the plugin.' How can I tell the difference between KRL called from the site tags and KRL called from the plugin?

Here's my ideas, but perhaps there is a better way?

Option 1: Use page parameter, maybe the plugin won't see it. Option 2: Use a second ruleset that calls into my primary ruleset. The plugin ruleset will hide the plugin div and unhide the 'thank you' div. I just have to have the primary ruleset support explicit events.

like image 452
Randall Bohn Avatar asked Dec 18 '25 04:12

Randall Bohn


1 Answers

I think your best option is to use a page parameter, as you said. This will only be sent to the ruleset from your site tags--not from the browser extension--so that should solve your problem. Your site 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 app you just have to check the page:param and do whatever you want with it:

is_site_tags = page:param("called_from_site_tags");

See here in the docs for more information. Hope that helps!

like image 87
Steve Nay Avatar answered Dec 20 '25 11:12

Steve Nay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!