Survey opt-in module troubleshooting

This article describes some common errors that you might encounter when implementing the survey opt-in module.

The opt-in module is not visible

If the opt-in module is not visible on your order confirmation page, look for the following possible sources of problems:

Problem Diagnosis
The HTML source code does not contain the opt-in module code View the HTML source in your browser and check that exactly one instance of the opt-in module code block appears on the page.
The opt-in module is off-screen or blocked by other elements The module might be rendered beyond the boundaries of the viewable area. Try scrolling. 
Your browser is unsupported Your browser must support HTML 5. Update it to the latest version.
E-commerce platform integration Some e-commerce platforms may have compatibility issues. Reach out to your e-commerce provider to understand implementation options.
Confirmation page on a different domain If your check-out process uses a third-party processor, it must redirect back to a confirmation page on your domain.
Opt-in module mode added to code added to Google Tag Manager Google Tag Manager currently cannot be used for the opt-in code integration.

The page encounters JavaScript errors

The following table lists common sources of issues with the opt-in module's JavaScript:

Problem Diagnosis
Placeholder values Replace the placeholder above with your site-specific, dynamic values.
A required parameter is missing

When implementing the opt-in module code, the following modules are required:

  • merchant_id [merchant_id]
  • order_id [order_id]
  • email [email]
  • delivery_country [delivery_country]
  • estimated_delivery_date [estimated_delivery_date]
DOCTYPE must be HTML 5

Make sure that your order confirmation page uses the HTML 5 DOCTYPE:

<!DOCTYPE html>

estimated_delivery_date [estimated_delivery_date] is invalid The date must be in the format YYYY-MM-DD, where YYYY is the four-digit year, MM is the two-digit month and DD is the two-digit day. The value is a string and must be surrounded by quotation marks. For example, "2016-09-13".
opt_in_style [opt_in_style] is invalid

The value of the opt_in_style [opt_in_style] parameter can be one of the following strings:

Website not using HTTPS All confirmation pages must use HTTPS.
Mismatched website URL The opt-in module code must be implemented on the same website URL as the one verified and claimed in Merchant Center. This issue typically uses generates a 404 JavaScript error.


Survey not received

Problem Diagnosis
Incorrect email address Ensure that you're passing correctly formatted email addresses into the module. Otherwise, the survey emails will not be delivered correctly.
Incorrect country codes Ensure that you're passing correct country codes into the opt-in module. This value must be in ISO 3166-1 alpha-2 format. If incorrect country codes are passed, no error will be generated, but the survey will not be set.
Not enough time has passed

Ensure that the estimated_delivery_date [estimated_delivery_date] for the order has passed. Customers who opt in to the survey receive an email that asks them to rate their experience a few days after the estimated delivery date that you included for the order in the survey opt-in module.

Additionally, the information shown in Merchant Center graphs can be delayed by up to one week.


Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Need help?

Contact us

Contact our support team

Clear search
Close search
Google apps
Main menu
Search Help Centre