Possible to automate the modification of a page element's HTML embed code?

Hello,

I am wondering if it is possible to automate modifying a page element’s HTML embed code?

Context: my client (a small startup with conservative growth goals) uses a Webflow page to embed a Calendly routing form used for generating leads. They’d like to do an A/B test of responses to two different Calendly Routing forms.

It’s easy enough in Webflow to manually swap out the unique resource links to either form in the embedding code (see pic - highlighted is the ruoting form’s unique resource string), but I wonder if this is the kind of thing I could automate?

Now, of course, Google analytics randomizing A/B acquisitions would be ideal, but this client does not have a budget for Google Analytics, nor a dedicated Google Admin. I figure the org I am assisting could manually swap the forms every week and make a useful comparison (it is their slow season), but they would prefer it if we could swap daily.

Is modifying an element’s HTML embedded code even the kind of thing that Webflow’s client API supports?

Even if it is not, just a solid “no” would be useful so I can stop spending time trying to find out if it is a pathway. If it is possible, I am, of course, all ears and eyes :slight_smile:

Thanks!

There is no client-side API to speak of.

In your case, I would expect you just use the CMS, fill a table with dates and calendly codes and filter the list so that it only shows todays calendar version.

Other options;

  • If there’s some reason you couldn’t use the CMS, you can just use custom JS to modify whatever you want. Pull the data from a Google sheet, pick the date, set the calendly code, that kind of thing.
  • A reverse proxy could do a similar thing but that’s more useful here when you have complex things happening that need server-side muscle, or where you need the changes made before any scripts run.
  • The Webflow API now has the ability to modify/build pages directly however that’s more useful for automating site builds. Push a button, get a lead funnel site. That type of thing.

Important note - A/B testing is kind of useless without analytics.

Your client doesn’t need to pay for Google Analytics or GTM but I’m not certain what Calendly offers in terms of integrations, and likely that’s where you’d need the conversion event to fire. Could be as simple as pasting in a GTM container ID.

2 Likes