How to use the @shopgate/tracking-core/helpers/helper.SGLink function in @shopgate/tracking-core

To help you get started, we’ve selected a few @shopgate/tracking-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shopgate / pwa / extensions / @shopgate-tracking-ga-native / frontend / Plugin.js View on Github external
this.register.setCampaignWithUrl((data, raw) => {
      const finalData = {
        url: data.url,
      };

      if (!this.isMerchant) {
        const shopgateUrl = new SGLink(data.url);
        shopgateUrl.setUtmParams(data, raw);
        finalData.url = shopgateUrl.toString();
      }

      this.appHandler.setCampaignWithUrl(finalData, this.cmdParams);

      return false;
    });