call js api function of sister concern website
i have another sister concern website. I have added snippet of that website but I don't want to add there. Can I call js api addtoaudince function from my main site ? If so, let me know how I can do it.
Also if this is possible then is there any limit ?
For example i have two domains abc.com and xyz.com. Both are same and I have created optimizely account and snippet for it. I don't want to put snippet on xyz.com. I want to put that (xyz.com) snippet on abc.com and want to make call of addtoaudince from xyz.com for abc.com. is it possible?
I don't think this is possible. In order for you to use the addToAudience API call, you need to specify an audience ID, and this audience ID has to be contained within the Optimizely snippet on the same page where the API call is made. Further, in order to make any kind of JS API call like this, you need to create or push to an array that the Optimizely script can consume. If the snippet is not on the page, you'll simply be creating an array that won't be processed.
May I ask why you don't want to install Optimizely on your second domain?
Solutions Architect | Optimizely, Inc.