Phoca Gallery Removes GA event code

Phoca Gallery - image gallery extension
AnnaVor
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 23 May 2018, 15:50

Phoca Gallery Removes GA event code

Post by AnnaVor »

Hello Community,

We created categories using Phoca Gallery.

I need to add GA event code to the phone number in the category description.

Here's the code that I add:
<a href="tel:+12538306601" title="+12538306601" onclick="ga('send','event','Phone Call','Click','Phone Number Clicks');">253.830.6601</a>

However, when I save the page here's how the code looks:
<a href="tel:+12538306601" title="+12538306601">253.830.6601</a>

GA piece of code gets removed.

I've tried the steps described in this article: https://www.ostraining.com/blog/joomla/ ... -out-code/
1. Changed the Joomla Text Filter option
2. Turned off the TinyMCE Editor

The problem persists.

Is there something I need to change in the settings?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Removes GA event code

Post by Jan »

HI, does it skip in other parts of your Joomla! (e.g. in articles)? Mostly saving javascript inside the text editor is disabled.

Category description is defined in this XML
administrator\components\com_phocagallery\models\forms\phocagalleryc.xml

Code: Select all

<field name="description" type="editor" buttons="true" hide="pagebreak,readmore" class="inputbox" label="COM_PHOCAGALLERY_FIELD_DESCRIPTION_LABEL" filter="JComponentHelper::filterText" description="COM_PHOCAGALLERY_FIELD_DESCRIPTION_DESC" /> 
You can try to edit this directly :idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply