Social Proof Mechanism – coding the Social Proof widget using a query

The Social Proof mechanism is a tool that allows placing on the website widgets showing the degree of interest of other visitors in each individual product.

The Social Proof module in SALESmanago allows you to obtain information about: 

  • the number of contacts on a given URL address within a certain period of time,
  • the number of products added to the cart within a certain period of time,
  • the number of products purchased within a certain period of time.

This functionality allows you to create your own, freely customizable widget and place it in a chosen location on the page, linking the appropriate method.  

The Social Proof widget can be created using both queries (method described in detail below) and a simple wizard.

Thanks to this, it is possible to show the visitors to the product’s website the activities of other users related to the product, thus building their trust and encouraging them to purchase. 


 Contents:

  1. Description of operation
  2. Query structure – visits
  3. Query structure – cart
  4. Query structure – purchase
  5. The coding in the image

1. Description of operation

In order to obtain the desired information on the website, use the GET method, applying relevant parameters. As a result, the numerical data corresponding to a given query (visits, baskets, or transactions) will be sent as a response from the SALESmanago server.


2. Query structure – visits

In the case of queries about visits, in case of correct authorization, it will result in the number of visits. In case of incorrect system authorization, the system’s response will be the value “null”. 

[1] social visit counts – a query whose numerical value will be given as a response to the SALESmanago system

[2] time – time interval for which the result will be returned (numerical value in minutes),

[3] key – the URL of the product together with the domain (if the product is added to the shopping cart or purchased, this value must be consistent with the location value in the External Event)

[4] shortID – this is a unique SALESmanago account ID – it can be found in the SALESmanago panel under Settings → Integration → Client ID,

[5] instanceIntID – This is the instance number assigned to the Vendor. This value can be found in SALESmanago panel in Settings → Integration. 


3. Query structure – cart

If the authorization is correct, a number will be obtained in response to a query specifying how many times a product with a given id has been added to the basket within the specified time period. In case of incorrect authorization of the system, the response of the system will be the value “null”. 

[1] social visit counts – a query whose numerical value will be given as a response to the SALESmanago system

[2] time – time interval for which the result will be returned (numerical value in minutes),

[3] shortId – this is a unique SALESmanago account ID – it can be found in the SALESmanago panel in the Settings → Integration → Client ID,

[4] instanceIntId – the value can be found in the SALESmanago panel under Settings → Integration. This is the instance number assigned to Vendor,

[5] productId – product identifier, which is mapped to the externalId field in the ExternalId Event on the SALESmanago side.


4. Query structure – purchase

If the authorization is correct, a number will be obtained in response to a query specifying how many times a product with a given id has been added to the cart within a specified period of time. In case of incorrect system authorization, the system response will be “null”.

[1] social visit counts – a query whose numerical value will be given as a response to the SALESmanago system

[2] time – time interval for which the result will be returned (numerical value in minutes),

[3] shortId – this is a unique SALESmanago account ID – it can be found in the SALESmanago panel in the Settings → Integration → Client ID.

[4] instanceIntId – the value can be found in SALESmanago’s panel in Settings → Integration → Integration. This is an instance number assigned to Vendor,

[5] productId – product identifier, which is mapped to the externalId field in the ExternalId Event on the SALESmanago side


5. The coding in the image

The obtained data can be used for presentation on the website as a Social Proof widget. This functionality allows you to encode the data in various ways.

The image below presents an example of encoding the Social Proof widget using HTML and Javascript.

An exemplary HTML structure that contains a product image and a container in which you can place a badge social proof.

The result of the query can be assigned to a variable (in this example this is the variable $amount), which then can be easily placed in an element of an HTML document.

CSS code for the above example:

If you need more information about the topic mentioned above, please contact us: support@salesmanago.com +1 800 960 0640