Adding labels to explorations data in GA4? - label

Is it possible to add an arbitrary label to a GA4 exploration?
For example I am tracking outbound link clicks for phone numbers. I would like to add a short description to each number.
I was thinking something like if Link URL equals 'tel: xx xxxx xxx' a label would say 'city office'. Any ideas on this?

Well... You have GTM tag added to your question. This implies that you're ok having a GTM solution.
Well, in GTM, find the tag that fires on the phone clicks, add a custom event property to the tag that would contain the description of the numbers, make a custom JS (CJS) or a look up table (LUT) or better a regex LUT, and map your numbers to descriptions.
Then go to GA and register that event property as a custom dimension. Done.
You could also override the link url dimension in GTM with a CJS var that would generate descriptions in the same dimension, but it's not a good idea to override default dimensions unless you're confident about what you're doing.
GA4 has capabs to modify event properties, but it's extremely basic and won't be able to change properties based on their values. Also, it's a bad idea to have data modification logic in GA. It's best to contain all data modification logic in one place whenever you can help it.

Related

Advise on ADF layout for email contacts

I have a requirement to show email recipients contact in a window. I am confused on what ADF layout is to be used.
Requirement is :
|To: <.input field> <.Contact name1> <.Contact Name2>... |
Contact names can be upto any number. So, if it takes up maximum width, next contact should be in the next line.
As far as i know, PanelGroupLayout can be either horizontal or vertical. So it doesnt help me here.
PanelFormLayout arrranges the contacts vertically first. So i cant use it here.
Is there any other ADF component that can be of help? Or do i need to write code and programatically create components with different layouts?
You could use the PanelFormLayout to layout field and their prompts and try changing the rows to 1 and maxcolumns to however many you have. Or the PanelGridLayout, depending on ADF version, which you don't mention.

Simile Timeline change order of lines

How do I change the vertical order of event lines in Simile Timeline? Where in the code does it decide what order to put them in?
I have tried looking into this also. I am convinced it is random order.
This not the answer you wanted but try using this timeline
http://almende.github.io/chap-links-library/timeline.html
It is quite flexible, you can choose your create your own layout and use your own CSS/HTML in each individual event.
Edit: Found a attribute that you could use to change the order
trackNum - used to override the automatic layout of events on the
Timeline.
check this wiki for more info: http://simile-widgets.org/wiki/Timeline_EventSources
under "Event Attributes for Developers"

Looking for an anti-spam solution easier to implement than Captcha

I'm looking for a simple anti spam form submission solution, other than Captcha. I've tried implementing Captcha into my website for anti-spam purposes, but it's been too difficult to integrate into the site. I don't get many spam attacks but I'd like to have something in place for the random spam that I get. Does anyone know of something they think would work?
you can add an additional textfield to your form and hide it with css. human users don't see the field, so it should always be empty. spambots usually fill out all form fields and don't know that this one is hidden. if you receive any content in this field, reject the form submission.
Put up something like "What is 3 plus 6?" and give the user a form to type the answer. Any human will get that, including blind ones who can't see a captcha, but no bot will. You don't even need to vary the numbers, really.

WP7 Changing 1 layout element based on another

Having no luck here trying to find a solution to this.
I've set up a looping selector based on this guide. (I also used the ListLoopingDataSource class in Part 2 in order to have strings in my looping list).
What I want to be able to do is then change another element (an image box/placeholder) on my layout, based on what is currently selected in the looping selector.
No real idea how to do this, the onSelectionChanged event is kind of abstracted and not really useful? I'm not sure how to programmatically change images either, it doesn't look like I can access a resource from the code base, only from the xaml.
Any help/suggestions would be greatly appreciated.
I found that I could do this by using binding.

Magento - adding a new field to the product options in admin

I'd like to add a new tab to the 'catalog->manage products->product information' page in the admin. Underneath the 'images' tab, I'd like to add a new tab for video, with a simple text input for adding a video url, which I can then grab for the frontend.
Anyone any ideas where the files are that I need to edit? I've been looking for the last couple hours with no joy. I found the list of current options in Mage_Catalog_Model_Resource_Eav_Mysql4_Setup but can't figure out how to add to them...
Seems it gets some from Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs. If I copy one of the tab sections here and change the title to Video, I can get it to display in the tabs on the left. But how do I then add the options for it?
What you are trying to do, from the sounds of it, is to create a custom field and add it to your catalog data. The good news is that you don't need to muck around in the PHP for that.
Head to Catalog -> Attributes -> Manage Attributes and create a new attribute for yourself called "Video URL" (or something to that effect). This will probably be a text field, and you may want to hide it from comparison on the frontend of the site (select "No" for all those boxes at the bottom of the form).
Once you've created an attribute, you will need to add it to an attribute set. If all your products are of one "type", and if you didn't create any other attribute sets, this should be only one step. Head to Catalog -> Attributes -> Manage Attribute Sets and create a "New Group" called "Video" and drag your new video url attribute into it. Save the attribute set and you should now have your new tab.
The only complication from what I read in your post could be positioning it underneath the images tab. Magento adds several tabs statically (the long way, in the PHP) and doesn't generally obey ordering of the tab groups. Consider the time tradeoff.
Hope that helps. Thanks,
Joe
Per your other comments, for the URLs a simple attribute would work but files would tend to be more difficult. To add a custom tab, as you said, you can edit (or in the case of a plugin, override) Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs::_prepareLayout and add your tab. You'll need to add a block or template to display your tab contents.
After that, you'll need to store the data somewhere. Looking in Adminhtml/controllers/ProductController, you should be able to hook into the catalog_product_prepare_save event to get data from $event->getRequest() and push it onto the product or save another entity as necessary.
I'm not sure how well file saving semantics would work on a product, so you may want to do your own data storage in the extension and then provide something like a getVideoForProduct method to retrieve it.
Then the only thing left to do is modify the catalog/product/view.phtml template file to include your thumbs and create a controller in your extension to provide a modal w/ the video (or do it in JS).
I know that's a bit of a general answer, but it's the rough path you would need to take for tabs. Let me know if any specific part of that is unclear.
Thanks,
Joe

Resources