I have this Problem, that I have created a new Kirbytag which was created so the users can easily create Call-To-Actions without the knowledge of HTML/CSS. But I am running against a wall when trying to use a link inside the Kirbytag (Kirbytag inside Kirbytag).
This is the Tag which is used for Standard Text insert: (cta: Call-To-Action Text)
And this is the one with the Link inside the KirbyTag (cta: Call-To-Action Text with (link: /contact text: Link))
But that also would deny me using Google Event Tracking or is there a way around this (I dont want to hardcode it since the Tracking has to be dynamic)?
If I did this: (cta: Call-to-action-text link: onclick="gtag('event', 'click', {'event_category': 'email','event_label': 'jobs'});" text: Link)
I’m afraid I don’t quite understand. What is the difference between adding the link with the link tag or adding it directly in your custom tag? Of course, you would have to modify your tag to include the link?
If i did this the output on the Website would break just like with the nested Kirbytags.
The reason I dont want to direcly add the Tracking inside the Kirbytag (in the tags.php) is because on One Page of the Website I might want to create a Call-To-Action linking to the contact Page with a Individual Tracking Code. Example: (cta: CallToAction InfoText link: /contact tracking: onclick="gtag('event', 'click', {'event_category': 'email','event_label': 'jobs'});")
But at the same time I want to have a Call-To-Action on a different page and with a different Tracking Code. Example: (cta: CallToAction InfoText link: /profile tracking: onclick="gtag('event', 'click', {'event_category': 'email','event_label': 'profile'});")
If the Tracking Code was hardcoded this would not be possible.