This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

How to customize links in Page Builder

8 years ago · Last reply by hrosen50 7 years ago

I would like to add the Google Analytics code inside the anchor tag to track PDF and doc files. I have been unsuccessful searching the forums save for the suggestion to add http://wordpress.org/plugins/black-studio-tinymce-widget/, which didn’t work.

Any suggestions? Thanks.

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

4
  1. Alex S Staff 7 years, 11 months ago

    Hi Hrosen,

    If you haven’t already, please install Insert Headers and Footers and add your Google Analytics tracking code visa that plugin.

    You can definitely use HTML to do this. The HTML would look like this:

    <a href="http://link.to/file.download" onclick="ga( 'send', 'event', 'File download', 'click', 'PDF/Doc download' );">Click here to download this file</a>

    For more information, please refer to this page.

  2. hrosen50 7 years, 11 months ago

    Hi Alex,

    Thanks for the info. Yes, I had the basic Google Analytics code installed. The issue is specific to the Melos theme and Page Builder. The latter strips out the PDF tracking code. Is there any way around that? I did allow WordFence to whitelist the link to the file.

    Thanks,
    Hal

  3. Alex S Staff 7 years, 11 months ago

    Hi Hal,

    To clarify, how are you adding the tracking code to your links? The Text widget, the SiteOrigin Editor widget? Please add the link via the Custom HTML widget.

  4. hrosen50 7 years, 11 months ago

    Thanks. I'll try this before too long.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread