Rich-text Reply

call js api function of sister concern website

hemang 09-03-15

call js api function of sister concern website

Hi 

 

 

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 ?

 

 

 

Thanks

 

 

 

Level 2

Re: call js api function of sister concern website

Hi @hemang,

 

I'm not sure I quite understand what your question is.  Could you clarify for me?

Harrison Krat
Solutions Architect | Optimizely, Inc.
harrison@optimizely.com
 

Re: call js api function of sister concern website

Or rather, is this thread what you're asking?  If so I'll try to offer a thought there.

Harrison Krat
Solutions Architect | Optimizely, Inc.
harrison@optimizely.com
 
hemang 09-10-15
 

Re: call js api function of sister concern website

@Harrison_Krat

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?


Thanks
Hemang



Level 2

Re: call js api function of sister concern website

Hi @hemang,

 

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?

Harrison Krat
Solutions Architect | Optimizely, Inc.
harrison@optimizely.com
 
hemang 09-11-15
 

Re: call js api function of sister concern website

Hi @Harrison_Krat


Thanks for reply.


I don't because it' sister concerned website and I want addtoaudience in one site and adding for both. It's ok if not possible


Thanks
Hemang
Level 2