Page 1 of 1

Phoca Gallery Removes GA event code

Posted: 23 May 2018, 15:59
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?

Re: Phoca Gallery Removes GA event code

Posted: 25 May 2018, 00:49
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