IMP SDK is a JavaScript library containing utilities for developing campaign sites like social, coremetrics, ... .

Installation

The fastest way to get started is to serve JavaScript from the CDN. It will give you ImpSdk namespace in your global scope.

Release Notes:

last updated: 7/19/16
Release Notes From v1.6.0:
  • Changed header css to match macys 16G release
  • Fixed showSharePopup’s modal to remain centered*
  • Added more client side validations to submitSweeps
Release Notes From v1.5.1:
  • Bugfixes in showQuickView
  • Changed the IMP_API_URL to akamized urls
Release Notes From v1.5.0:
  • Added Add to bag feature
    • addToMacysBag
  • Added Add to wishlist feature
    • addToMacysList
  • Added get env feature to detect the environment.
    • util.getEnv
  • Enhancements
    • Moved the get device feature under the namespace util
      • util.getDevice
    • Added functionality to update options for showSharePopup
    • Added polyfill for ES6 Promises
    • Fixed typo for the word “successfully” in QuickView and Registry
Release Notes From v1.4.1:
  • Fixed Header/Footer CSS to avoid clashing with addToRegistry
Release Notes From v1.4.0:
  • Added Device Detection feature
    • ImpSdk.getDevice
  • Added add to registry feature for quickView
  • Fixed shareFacebook issue which imposes unintended requirement
Release Notes From v1.3.0:
  • Added login feature
    • authentication.showLogin
    • authentication.getLoggedInUser
    • authentication.logout
  • Fixed shareTwitter to work with iPhone popups
  • Added _testGetInternationalPricing for testing international pricing without cookies
Release Notes From v1.2.0:
  • Added getInternationalPricing
  • Fixed shareFacebook on fds.com domain
  • Fixed checkout link in Quickview to point to the corresponding environment
Release Notes From v1.1.2:
  • Added addToGenericList
  • Added removeFromGenericList
  • Added getGenericList
  • submitSweeps: Added enhancement to support multiple entries per sweepstakes or for multiple sweepstakes (ie. different prizes). Json data input will accept optional sweepstakesId and maxEntries and validate accordingly.

  • Quickview: Fixed button styles in QuickView for Chrome (Windows).

  • Added cookie domains.

Release Notes From v1.0.0:
  • showHeaderAndFooter: (Breaking from v0.*) Updated CSS styling. Adopted requirements to prevent CSS clashing:

    • Please do not use <header> or <footer> elements anywhere on the campaign page.
    • The target element container id for the header is "ImpSdkHeaderContainer".
    • The target element container id for the footer is "ImpSdkFooterContainer".
    • The target element containers for header and footer must be direct child elements of the <body> element.
  • showSharePopup: (Breaking from v0.*) Adopted the latest shareFacebook, shareTwitter, sharePinterest modules. Added a node-style callback function. Modified function signature:

    • options object with all of the properties required by shareFacebook, shareTwitter, sharePinterest.
    • styles object with properties to modifiy the default appearance of the modal or an empty object.
    • target string as the element id of the container for the social share popup.
    • callback function in node style required by shareFacebook and shareTwitter.
  • shareFacebook: (Breaking from v0.*) Adopted the latest version of Facebook SDK which supports inclusion of images in shared posts. Modified the function signature and changed the sharing side effect:

    • accepts an options object that has modified property names along with a new picture property,
    • accepts a callback function as a second parameter,
    • displays Facebook sharing as a separate popup window instead of a full-page display in a new tab. Popups will need to be enabled in the browser for that particular hostname.
  • shareTwitter: (Breaking from v0.*) Added node-style callback for handling API calls to Bitly (url-shortener). Modified options object properties:

    • description is the name of the tweet message.
    • link is the url to be shared in shortened format created by Bitly.
  • sharePinterest: (Breaking from v0.*) Modified options object properties:

    • description is some information about the shared image.
    • link is the url of the campaign where you can find out more about the image.
    • picture is the url of the image.