Streaming live at 10am (PST)

Element IDs generated and updated automatically?

#1

Hi there!

I’m experiencing an issue regarding element IDs.

Using Google Optimise I set up an experiment that personalises the content of my Webflow landing page on the basis of Ad Groups on Google. For each personalisation, you use an Optimises editor in which you can select elements of your site (based on their IDs) and change their content.

If you do not specify an ID in the Webflow designer, an element ID is generated nonetheless (see below, in Chrome Inspector and Google Optimise).

All worked fine using this ID initially, but after a couple of days the ID generated for the element changed (without my intent or knowing) and the personalisation in Google Optimise stopped working (as it is element ID specific).

My first question: How are these ‘default element IDs’ generated, and is there a dynamic aspect to this generation (i.e. are these IDs generated each time you re-publish your site)?

My second question: Will manually assigning element IDs in the designer for the elements I’d like to personalise fix the problem, or will they still be over-written with Webflow’s placeholder IDs?

Thanks for your support!
– Alessandro

1 Like
#2

Hello @alessandro-webflow

I know that Webflow ads some ids to elements who have interactions, but I think they look different. Something like data-w-id. Maybe @mistercreate can help? :blush:

Piter :webflow_heart:

1 Like
#3

Hi @alessandro-webflow,

Thanks for reaching out about your IDs changing, and this is a great question.

When using Grid within your layout: it automatically adds IDs to elements within the Grid. However, these auto-generated IDs change upon republish.

If you add an ID manually: the auto-generated name will then become a class, and will not interfere with your ID name.

Great question! Hopefully this was helpful :bowing_man:

2 Likes
#4

@PiterDimitrov @mistercreate Thanks for your help, much appreciated !!

I’ll add IDs manually to the elements I’d like to personalise and that should do the trick.

:pray: :pray: :pray:

1 Like