Send Consulted or Favorited POI

How to contribute to Woosmap Recommendation posting Consulted or Favorited POI
  1. Send User Favorited POI
  2. Send User Consulted POI

Send User Favorited POI

The Recommendation API can improve the user location profile by collecting POI consulted or set as favorite by a user. When a user click on the button “Set As Favorite” from the stores list, we call the woosmapRecommendation.sendUserFavoritedPOI() passing the Store Id and location information as parameters. Check PostPOIPositionOptions reference.

Select a Coffee Shop

loader

function favoritedStore(elem) {
    woosmapRecommendation.getConsent((consent) => {
        if (consent === true) {
            woosmapRecommendation.sendUserFavoritedPOI({
                lat: elem.getAttribute('data-lat'),
                lng: elem.getAttribute('data-lng'),
                id: elem.getAttribute('data-storeid'),
                successCallback: function () {
                    elem.textContent = "Favorited";
                }
            });
        }
    });
}

Send User Consulted POI

Instead of posting a favorited POI, you could send a consulted POI by using the woosmapRecommendation.sendUserConsultedPOI() PostPOIPositionOptions reference.