Jump to content

Thijs00

Member
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Thijs00

  1. @sorca_marian I have asked Chatgtp for help and he gave me a code to help fire a trigger in GTM. This is the answer i got and it works. (mind you to not put the " " in the trigger description of GTM, just formSubmitSuccess is enough ) To set up a Google Tag Manager (GTM) trigger and a tag that reacts to the addition of the class "form-submitted-successfully" to the body element of your webpage, you can follow these steps: Step 1: Set Up a Custom Event Trigger In this case, it's more efficient to directly send a custom event from your JavaScript function to GTM, instead of waiting for the class to be added. This gives you more control and ensures the tag fires at exactly the right moment. Here’s how you can modify your function: <script> function onFormPostSubmit() { // Add your JavaScript logic here document.body.classList.add("form-submitted-successfully"); // Send an event to Google Tag Manager window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'formSubmitSuccess' }); } </script> Step 2: Create a Trigger in GTM Log in to your Google Tag Manager account. Navigate to the 'Triggers' section and click 'New'. Choose the trigger type 'Custom Event'. Enter the event name that you used in your dataLayer push, in this case, formSubmitSuccess. Set the trigger to fire on all Custom Events that match this name. Step 3: Create a Tag to Send to GA4 Return to the GTM overview and select 'Tags' followed by 'New'. Choose the tag type 'GA4 Event'. If you haven't set up a GA4 configuration tag yet, you'll need to do that first. Give the event a name, for example, 'form_submission'. Add any event parameters as necessary. This could be specific information you want to track about the form submission, such as the values filled out (be mindful of privacy regulations). Select the trigger you just created, 'formSubmitSuccess', for triggering. Step 4: Test and Publish Use the 'Preview' mode in GTM to test if your trigger and tag are functioning correctly. This shows you in real-time whether the events are being sent when the form is submitted. Once you have verified that everything works correctly, click 'Publish' to push your changes live. With these steps, you can create a robust and accurate tracking setup for form submissions on Squarespace, using GTM and GA4. .
  2. I have the exact same question. With Zapier it only got me to integrate SS forms to trigger Discord, however i want to share SS member sign-on with discord.
  3. //logo kleur dynamisch body [class*='collection-type-blog'], [class*='collection-62aba8aa57c97a47c18f05fa'], [class*='collection-62f104a3b403ca581b0d89ee'], { header#header img { content: url(https://images.squarespace-cdn.com/content/62aba5522f5ccd5bc3b91ed1/b85b097d-2597-429c-922a-3f0bfa142e1a/Artboard+2.png?content-type=image%2Fpng); } } I have figured out a different way, I have the reversed the standard logo with a darker colour, and only changed the homepage and some extra pages manually. This work perfect. Thanks for your help.
  4. Hi Tuan, Thank you for you help on this forum, I have found plenty of solutions from you al ready. Now I have the same question as above, however, I would like to change the picture of the logo on all the lighter pages of my website. Maybe a combo of these two? //Invert header logo color on dark themed Sections .dark, .dark-bold, .black, .black-bold { &.header .header-title-logo a { filter: invert(1); -webkit-filter: invert(1); }} And this Would that be possible? This is an example of my SP pages with the faulty logo color https://bronze-arugula-pk75.squarespace.com/mission Thanks in advance Thijs
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.