Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #501878

    Where do I put the code to add a click event in a slider in Enfold? I believe I have the correct syntax for the link/event but I have no idea where to put it. the “link” box wont take the extra code. Is this something that gets added to a file that I need to FTP?

    #501986

    Hi elrey52,

    What code are you trying to add and to what element? Please post an admin login in the Private Content of your reply. so that we can have a closer look.

    Regards,
    Rikard

    #503079

    The slider I am using is basically just a banner. There is an “enter URL” box at the top that makes the whole slider a link. That is what I have always used for the link for this particular slider. In layer 1 of my slider I just have an image. in layer 2 I just have some text.

    I have the code for my Click Event but if I put the code in that “Enter URL box” it does not work and there is no link at all for the banner.

    I can add the link to the HTML portion of layer 2. then the text associated with the slider becomes a link and fires the Click Event successfully but then only the text is a link, not the entire slider.

    I would like for the whole slider to be a link again and fire the click event.

    • This reply was modified 9 years, 2 months ago by elrey52.
    #503607

    Hi!

    I checked the URL you have provided and luckily it’s working without editing any host file. The whole banner is clickable for me, so it seems you have fixed it already?

    Regards,
    Andy

    #503615

    no, still not fixed. . I have a production site (same URL) and a test system at the different IP Address. So the URL will work without the host edit but it will be accessing my production site where the banner is currently just a link. I am currently only trying to get the OnClick event working on the test system. Making the banner a link is not a problem but making it work as a link and fire the onclick event is a problem. On my test system the banner is not a link, only the text is and it fires the clickevent.

    #503928

    Hey!

    which kind of OnClick event are you referring to? can you show us which code you want to implement? you can use pastebin.com

    Regards,
    Andy

    #504133

    I have pasted the link that is working below .

    <a href="http://idealtridon.com/prolok" onClick="ga('send', 'event', { eventCategory: 'banner', eventAction: 'click', eventLabel: 'prolok banner', eventValue: 1});">PROLOK - our new band and buckle product line. A MUST SEE, click here for details.</a>

    in the HTML box of layer 2 of the slider the above link works. But if I remove that link from the html portion and put it in the URL box then it doesn’t. I get no link at all when that happens.

    my current setup on production site
    URL – http://idealtridon.com/prolok (the whole banner is a link)HTML of layer 2 – “PROLOK – our new band and buckle product line…….” (text only)

    current setup on the test site
    URL – (blank)
    HTML of layer 2 – <a href="http://idealtridon.com/prolok" onClick="ga('send', 'event', { eventCategory: 'banner', eventAction: 'click', eventLabel: 'prolok banner', eventValue: 1});">PROLOK - our new band and buckle product line. A MUST SEE, click here for details.</a> – this makes the text a link but not the banner.

    • This reply was modified 9 years, 2 months ago by elrey52.
    #504144

    Counting the banner clicks is a hot issue with my marketing department right now so I have moved my “Test” setup into production. So now both sites have the text in the banner as a link which fires the click event. However I am still interested in my initial issue of making the whole banner a link again and firing the clickevent.

    • This reply was modified 9 years, 2 months ago by elrey52.
    #507106

    Hi!

    Not sure if it would work but you could try adding your own custom click events.

    <script type = "text/javascript">
    jQuery('.ls-inner > .ls-slide:nth-child(2)').on('click', function(){
    ga('send', 'event', { eventCategory: 'banner', eventAction: 'click', eventLabel: 'prolok banner', eventValue: 1});
    });
    </script>
    

    If it was me I would just add it to a button in the slide.

    Regards,
    Elliott

    #554655

    Where would this be added? into the HTML code on the slider?

    #556719

    Hi!

    Try putting that in a Code Block below the LayerSlider.

    Regards,
    Josue

    #560785

    thanks. The code block suggestion helped as I was completely lost on where to put code. I added an ID# to my slider of “Prolok_banner” and then the below code got me working. I also tested with taking the ID off and putting it just on 1 slide of the slider (like just the text instead of the image) so I verified that it works in a variety of manners. Thanks for your help. I had to use part of your solution and some from various google analytic s links as there is no way I would have gotten this working by myself.

    
    <script type = "text/javascript">
    jQuery(document).ready(function ($) {
    	$('#Prolok_banner').on('click', function() {
    	  ga('send', 'event', 'banner', 'click', 'prolok banner', 1);
    	});
    });
    </script>
    
    #560811

    Just a heads up Google Tag manager with Google analytics and Enfold works really great!
    You can add click listeners to execute your events and send it over Google Analytics.
    I have been able to track almost 90% of everything pretty easy.

    Have been asking before how I’m able to add unique identifiers to elements like sliders, Image galleries and submit buttons.
    Hope really someone at your awesome support team adds a ticket for this to your backlog so we really can enjoy Enfold with Google Tag Manger to 100% would be so fucking over the top!

    My best tip for you is to use Google Tag Manager and use the inbuild click listener to generate and event to Google Analytics.
    There are so many simple guides on the net how to make this happen for your site. :-)

    Did a fast search on google : google tag manager event tracking
    Maby this yt url can help you out “has not anything to do with me”

    • This reply was modified 8 years, 10 months ago by apower84.
    #560827
    #560992

    Hi @Josue

    Really!!! Got damn mate fantastic! Going to get back on you on this right now to mutch celebrationss bobbs and beer! :-P
    Are you the Google Tag Manger / Analytics person to ask about this Q for the Enfold theme?

    If you marry Enfold and GTM toghter im ready to belive in santa :-D

    #561568

    You are welcome. Not really, we all know a bit of SEO and related :)

    Regards,
    Josue

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.