Add the ButtonJS Library to your Website


PostTap SMS is enabled with the ButtonJS library. You can install it on your website easily as an HTML script snippet. This is be done either by adding the snippet directly into your website's codebase, or with any Tag Manager you're already using.

Initialize the ButtonJS Library

To integrate ButtonJS, place the following code in your website somewhere between the <head> and </head> tags, as close to <head> as possible.

  window.ButtonWebConfig = {
    // Replace the value of applicationId with your Mobile Web App ID
    // from the Button Dashboard:
    applicationId: 'YOUR_APPLICATION_ID_HERE',
    // The following property is required
    enableSmsCollection: true

                        })(window, document, 'script', 'bttnio');

For proper implementation and tracking, the above snippet should be loaded on every page of your website.

As noted in the snippet above, be sure to replace YOUR_APPLICATION_ID_HERE with the one that can be found by logging in to the Button Dashboard:

This is the only step needed to enable SMS collection on your website. Any of the additional features of ButtonJS, like reporting Orders and Page Views, require the above snippet to be loaded first.

Testing Your Integration of ButtonJS

As stated above, if the steps in this guide aren't completed correctly, none of the other features in ButtonJS will be functional. To ensure you've done this step correctly, in your browser's address bar type in the following line and press ENTER:

Be sure to replace with the website you've added ButtonJS to.

Then, in that same page, open the Javascript Console, and type in the following code and hit ENTER:


This should return the value of the btn_ref query string parameter value in the URL: srctok-abcd1234. If executing this Javascript code in the console returns anything other than the value of btn_ref, check the steps above again to make sure they were completed correctly.

If you continue to have issues, please reach out to your Customer Success Manager.