How can I adjust Google Analytics custom Javascript for Usercentrics integration?

Hi!

We want to use an app called Usercentrics for the consent management. Unfortunately, with our current setup, the cookies from the Google Analytics Shopify Integration are still set, because the GA App is not aware of the consent.

In the settings of our Shopify Store, there is the option to insert custom javascript for Google Analytics (see screenshot) and for Usercentrics to work, an adjustment must be made in the code of Google Analytics. This change looks like the following:

This part: <script type="text/javascript>

needs to be changes to this:

<script type="text/plain" data-usercentrics="Google Analytics“> Is it possible to insert the required adjustments via the custom javascript field to make Usercentrics work? Do you have any idea if we could use this functionality of custom javascript to be able to use Usercentrics with Shopify? And if yes, how should the custom javascript look like? Unfortunately, the Usercentrics Support said I need ask Shopify, as they don't know what's possible within these settings of our store. And the Shopify support said that their knowledge is limited and I should ask the community :wink: Can you please help? Looking forward to your answers! Thanks and best, Michael ![Bildschirmfoto 2022-03-24 um 19.47.49.png|1011x352](upload://j6y4FOjRmH65692pyutiQdFpOKN.png)