If you’re using WPBakery or Elementor, you can hide the Raw HTML element on the desktop directly from the Advanced tab:
For WPBakery:
1. Edit the page with WPBakery.
2. Select the Raw HTML element.
3. Click on Design Options.
4. Set “Hide on Desktop” to Yes.
5. Save changes and update the page.
This will ensure the tracking code only appears on mobile while remaining hidden on desktop.
You can achieve this by adding the Raw HTML element inside a column and using WPBakery’s responsive options to hide it on the desktop. Here’s how:
-Edit the Page with WPBakery.
-Create a New Row (if needed) and add a Column.
-Insert the Raw HTML element inside the column.
-Edit the Column Settings and navigate to the Responsive Options tab.
-Set “Hide on Desktop” to Yes.
-Save changes and update the page.