Ask-a-Friend can be implemented in two ways as shown below. This page will describe the steps to embed a poll on your category page.



Step 1: Configure the Ask-a-Friend app


Setup the basic look and feel of the app. Click here to view the instructions.

In the advanced settings of the campaign clear the “Data extract Javascript Code” field. 

Uncheck the “Enable Add-To-Poll Button” field.



Step 2: Changes required on the website


Add a button with each product displayed in the category page.

The onclick action on this button should invoke a Javascript function called “ss_mi.add_to_poll (prod_info);”  

Where prod_info is a JS object which consists of following information:

  • image_url: <Product image URL>
  • page_url: <Product page URL>
  • title: <Product page title>

 


Please find the sample code below. Populate the product info for each product dynamically.

Note: This is just for reference. Populate the product info for each product dynamically.


 

<div id="ss_af_cat_atp" > <a href="javascript:void(0)" onclick="ss_mi.add_to_poll({
   image_url: 'https://dl.dropboxusercontent.com/u/36619447/live-demos/Ask-a-friend/nectarclothing_files/BloomingBeautySundress3699.jpg',
   page_url: 'http://www.nectarclothing.com/blooming-beauty-sundress/',
   title: 'Blooming Beauty Sundress'
  })">
  <img src="https://d1qbqkkh49kht1.cloudfront.net/1f04b52bb53b55f019c2fa5ac82b3d99.png"> </a> 
</div>

 

 

For any help write to support@shopsocially.com.