> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mention-me.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Testing the Postpurchase Tag

> How to test the Mention Me postpurchase tag on your order confirmation page in both Demo and Live environments.

The postpurchase tag fires on your order confirmation page, triggers the referral popup, and closes the referral loop by crediting the referrer. This guide covers testing in both Demo and Live environments.

<Tabs>
  <Tab title="Demo">
    <img src="https://mintcdn.com/mentionme/DW6A4iNCa7LrbN3W/images/knowledge/onboarding/testing/31628349399197.gif?s=a253cc43c8819d1cba91ac7e82355516" alt="Testing the postpurchase tag in DEMO environment" width="800" height="358" data-path="images/knowledge/onboarding/testing/31628349399197.gif" />

    ## Website Test

    <Steps>
      <Step title="Proceed through checkout">
        Add an item to your basket and proceed through checkout, using your test referee email at purchase.
      </Step>

      <Step title="Check the referral popup">
        Place the test order. On the order confirmation/thank you page, a Mention Me popup should appear:

        * A message thanks the customer and confirms their purchase.
        * The popup invites the customer to refer friends with an offer.
      </Step>

      <Step title="Verify network requests">
        Open DevTools, go to the Network tab, reload the page, and filter for your **partnerCode**. Find the request to **tag-demo.mention-me.com** with:

        * **environment:** demo
        * **situation:** postpurchase
        * All required customer and order details (e.g. **firstname**, **surname**, **email**, **order\_number**, **order\_subtotal**, **order\_currency**, **coupon\_code**, **locale**)
      </Step>
    </Steps>

    ## Platform Verification

    <Steps>
      <Step title="Check the Debug Dashboard">
        Check your [**Debug Dashboard**](https://demo.mention-me.com/merchant/~/tools/debug-dashboard) for the latest postpurchase tag fired with your test referee email and confirm all order details have been captured.

        <img src="https://mintcdn.com/mentionme/DW6A4iNCa7LrbN3W/images/knowledge/onboarding/testing/31628393399069.gif?s=d02ad86b1b09da9f90f20f1be051a086" alt="Debug Dashboard showing postpurchase tag data" width="800" height="399" data-path="images/knowledge/onboarding/testing/31628393399069.gif" />
      </Step>

      <Step title="Verify the referee profile">
        Go to [**Customers**](https://demo.mention-me.com/merchant/~/customers/) and search for your referee test email:

        * Status should show **Paying customer**
        * Profile should include matching campaign, order ID, and referral details
      </Step>

      <Step title="Verify the referrer is credited">
        Search for your referrer's email:

        * The referrer should be credited/rewarded (confirmation of closed referral loop)

                  <img src="https://mintcdn.com/mentionme/DW6A4iNCa7LrbN3W/images/knowledge/onboarding/testing/31615301171101.gif?s=ea9ec90231926d38b08f41eef0c3e528" alt="Verifying referee and referrer profiles after postpurchase test" width="800" height="358" data-path="images/knowledge/onboarding/testing/31615301171101.gif" />
      </Step>
    </Steps>

    ## Troubleshooting

    * **No popup on thank you page** -- confirm the postpurchase tag is on your order confirmation page and using the DEMO tag. Check for browser errors or blocked scripts.
    * **No network request to tag-demo.mention-me.com** -- ensure the correct JavaScript tag is implemented.
    * **Required customer data missing in request** -- all required fields must be passed on order confirmation (see field list above).
    * **Referral not tracked/credited** -- confirm the same referee email was used for both checkout and purchase steps.

    ## Need Help?

    Contact the team via the [help form](https://help.mention-me.com/hc/en-gb/requests/new?ticket_form_id=1900000712373) with testing details and screenshots.
  </Tab>

  <Tab title="Live">
    <img src="https://mintcdn.com/mentionme/DW6A4iNCa7LrbN3W/images/knowledge/onboarding/testing/31621997685661.gif?s=97e06195db82b6687e126dd2fb2d92f5" alt="Testing the postpurchase tag in LIVE environment" width="800" height="356" data-path="images/knowledge/onboarding/testing/31621997685661.gif" />

    ## Website Test

    <Steps>
      <Step title="Start checkout">
        Add an item to your basket and start checkout.
      </Step>

      <Step title="Open DevTools">
        Open DevTools, go to the Network tab, and filter for your **partnerCode**.
      </Step>

      <Step title="Place the order and check the popup">
        Place the live order. On the order confirmation/thank you page, a Mention Me popup should appear:

        * A message thanks the customer and confirms their purchase.
        * The popup invites the customer to refer friends with an offer.
      </Step>

      <Step title="Verify network requests">
        Check the Network tab for the request to **tag.mention-me.com** with:

        * **environment:** production
        * **situation:** postpurchase
        * All required customer and order details (e.g. **firstname**, **surname**, **email**, **order\_number**, **order\_subtotal**, **order\_currency**, **coupon\_code**, **localeCode**)
      </Step>
    </Steps>

    ## Platform Verification

    <Steps>
      <Step title="Log in to the live portal">
        Log in to your [**Mention Me live portal**](https://app.mention-me.com/merchant/~/).
      </Step>

      <Step title="Check the Debug Dashboard">
        Check your [**Debug Dashboard**](https://app.mention-me.com/merchant/~/tools/debug-dashboard) to ensure the latest postpurchase tag fired with your test email and all order details are captured.

        <img src="https://mintcdn.com/mentionme/DW6A4iNCa7LrbN3W/images/knowledge/onboarding/testing/31622019018653.gif?s=586764bb8dc0a32757d410e89312f7c9" alt="Debug Dashboard showing LIVE postpurchase tag data" width="800" height="356" data-path="images/knowledge/onboarding/testing/31622019018653.gif" />
      </Step>

      <Step title="Verify the customer profile">
        Go to [**Customers**](https://app.mention-me.com/merchant/~/customers/) and search for your test email:

        * Status should show **Paying customer**
        * Profile should include matching campaign, order ID, and referral details

                  <img src="https://mintcdn.com/mentionme/DW6A4iNCa7LrbN3W/images/knowledge/onboarding/testing/31622019020061.gif?s=93c28082ee54048963e982e91d6038f0" alt="Verifying customer profile in Production after postpurchase test" width="800" height="356" data-path="images/knowledge/onboarding/testing/31622019020061.gif" />
      </Step>
    </Steps>

    ## Troubleshooting

    * **No popup on thank you page** -- confirm the postpurchase tag is correctly installed and using the live tag. Check for browser errors or blocked scripts.
    * **No network request to tag.mention-me.com** -- ensure the production JavaScript tag is implemented.
    * **Required customer data missing in request** -- all required fields must be passed on order confirmation.
    * **Error responses from Network request:**
      * **400 -- Bad Request:** check the payload for missing or malformed parameters
      * **403 -- Forbidden:** check that you have enabled debug mode
      * **404 -- Not Found:** your partnerCode or URL may be incorrect

    ## Need Help?

    Contact the team via the [help form](https://help.mention-me.com/hc/en-gb/requests/new?ticket_form_id=1900000712373) with test steps and screenshots.
  </Tab>
</Tabs>
