The Ambassador Developer Hub

Welcome to the Ambassador developer hub. You'll find comprehensive guides and documentation to help you start working with Ambassador as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    API Reference

Cookie Fetching

Cookie "mbsy_short_code" Fetching Snippet

If you want to fetch the visitor's referring "mbsy" short code from their cookie to send to your back-end, you may include the following JavaScript snippet on your page.

NOTE: You do not need to include this snippet when using the ecommerce, form, image, or javascript integration snippets as we will fetch the visitor's referral cookie automatically.

The snippet will set the JavaScript variable "mbsy_short_code" equal to the referrer's short code (which is also passed to your landing page via the querystring).

If the visitor was not referred by anyone the variable will be set as an empty string.

<script type="text/javascript" src="[[app:username]]"></script>

Updated 7 months ago

Cookie Fetching

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.