Can we add the "return_gtag_report_conversion" to my button instead of using the HTML embed?
No, you cannot directly add the "return_gtag_report_conversion" to a button in Webflow without using the HTML embed. The "return_gtag_report_conversion" is a JavaScript function that is typically used to track conversions in Google Analytics using Google Tag Manager.
To add the "return_gtag_report_conversion" function to your button in Webflow, you would need to follow these steps:
Create a new custom code component: In Webflow, click on the plus icon (+) in the Navigator panel and select the "Custom Code" component.
Place the custom code component on your page: Drag and drop the custom code component to the desired location on your page, where you want the button to be.
Open the custom code component settings: Double-click on the custom code component to open the settings panel.
Add the code: In the settings panel, click on the "inside
" option to insert the code within the body tag. Then, paste the code for the "return_gtag_report_conversion" function inside the code editor.Save and publish your changes: Once you have added the code, save your changes and publish your Webflow project to make the changes live.
Keep in mind that in order for the "return_gtag_report_conversion" function to work properly, you need to have your Google Analytics tracking code set up correctly on your Webflow website. Additionally, you may also need to properly configure Google Tag Manager to track the specific button click event that you want to monitor.
Using this method, you can incorporate the "return_gtag_report_conversion" function into your button without relying solely on the HTML embed feature.
Additional Questions:
- How can I track conversions in Google Analytics using Webflow?
- What is the process for adding custom JavaScript code in Webflow?
- How does Google Tag Manager work with Webflow?