• Resolved brentmercer

    (@brentmercer)


    Hello,

    I have a client running on WP with the Constant Contact plugin that integrates with their CC account. They want me to build custom AMP pages for their site, so I’m not using the AMP plugin for WP. I’m building the AMP templates from scratch, which means I can’t use the CC plugin (uses 3rd party JS, which isn’t allowed)

    In building the AMP newsletter signup form, I’d like to connect my custom form with the CC plugin functionality. I believe I need a server endpoint URL to put into the “action-xhr” field, but I’m not sure what that URL is.

    Is connecting the form in this way possible? If so, where can I find that action-xhr endpoint?

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Constant Contact

    (@constantcontact)

    Not quite sure which third party JS you’re referring to, other than perhaps some details around the Google reCAPTCHA integration that we have available.

    Are you trying to basically extend the plugin in your own way, instead of perhaps utilizing your own custom integration?

    Thread Starter brentmercer

    (@brentmercer)

    Not exactly. The CC plugin is what’s causing AMP errors, so I’m trying to build a custom, AMP-friendly form instead. But I’m not sure how to connect my AMP form to my CC list.

    The AMP form require an ‘action-xhr’ form element, which is a URL pointing to a server endpoint, instead of and ‘action’ form element, which the CC plugin uses. Plus, the CC plugin contains unique scripts that AMP rejects.

    That ‘action-xhr’ URL endpoint is what I’m having trouble with. I’m not sure where to find that endpoint.

    All I really need to do is have my AMP form collect emails and send them off to my CC list, without using forms in the CC plugin.

    Hope that makes sense… Cause I’m struggling with it.

    Plugin Author Constant Contact

    (@constantcontact)

    The plugin here isn’t doing anything special for action urls other than just posting to the site that the plugin is installed on, and collecting the submitted data for sending to Constant Contact with https://github.com/constantcontact/php-sdk/

    Essentially making the plugin here a general form builder that collects info for server-side API requests with that SDK. I could see being able to create your own action-xhr endpoint somewhere where you collect data and send your own way.

    Wish I had better answers for you than that at the moment.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Integrating with custom AMP templates’ is closed to new replies.