Keeping Google Tag Manager Events if i change shopify theme.

Shopify Partner
5 1 1

hey, i just added Google Tag Manager events using css selectors on my store utilizing an impulse theme.


I want to retain the events which are of navigation, homepage collections view, homepage products view,  product page, checkout, 

-- I wanted to retain the events, but i think if theme changed, classes willl change, hence it won't work.


I wanted technical help, that from where does shopify send enhancedCommerce events or such, which shopify auto adds and thats independent of theme change. Can you guide me how do i add events that are likes of the shopify events so i remain independent on theme for product analytics events.


Thankyou. Longtime Shopify Advocate.