GA Custom Dimensions in Wordpress - implement datalayers correctly - javascript

I need some guidance on a problem I can't solve with google so far.
Situation:
I have a wordpress site with the custom post type Jobs. With the plugin Advanced Custom Fields I created custom fields i want to track (location, type of contract, company).
In google Analytics I created 5 custom Dimensions:
postCategories (can be Blog or Job category and can have more than 1)
postTags (same as 1)
jobContract
jobLocation
jobCompany
My Question: how do I pull the variables from WordPress? I know that i can do this with GTM and Datalayers, but i don't know what code i have to implement into my wordpress site to push these variables into Datalayers so that GA can track it as Custom Dimensions. I also struggle with the multiple category thing. If i define data layers, how can i track multiple Categories for 1 pageview?
I hope my description is clear, if not feel free to ask :)

Assuming you have set up your pageview tag in GTM, you can add the variables from the JavaScript macros within the “custom dimension” field under the tag set up.
Go to variables and create a custom variable and to retrieve these tags. Depending on how they are displayed would change how you can retrieve them.
Can you post a screen shot of what the page looks like or a URL to view?

Related

Django custom page based CMS

I am searching for django CMS that allows me to create something like custom pages build from predefined components.
Every page should be builded from custom "inpage" components like:
carousel with images
gallery with images
richtext field
plain text field
So as a developer I will build a template for every page of a website from this components and assing a CSS file for the given page. For example one page can look like:
plain text field (heading)
plain text field (some kind of page abstract)
richtext field (part of the text)
gallery with images (few specified images with some style)
richtext field (another part of the text)
Another page could be build in a different way. The key idea is, that every page will have predefined unique layout (template) that is not breakable by users in CMS.
The CMS I would like to use, should allow the user to change content of the particular componets for particular page. So the CMS should create form to change the content of the particular components for a given page (heading, text, images in carousel).
The changable content of the page (form fields) can be stored in database of files, it does not really matter.
The main idea behind this concept is to prevent user from changing the layout provided by designer and enforce the correct styles and correct "content type" for every part of every page.
Note: I used a Mezzanine for last few years and it seems to me easier to code the proposed CMS from scratch rather than use the Mezzanine somehow in this way.
My questions:
does something like exist?
has this type of CMS a common name?
Sorry for being too broad, but I do not really how I can search such a thing (in case it already exists - or at least something similar). Any hint, comment or advice will be more than welcome.
your question is too broad but to answer it quickly:
I don't know that anything like this exactly already exists
There's no common name for this as far as I know.
You're asking two things - one, you want to create a website and give each user some control over the content they create (I suppose you're creating some blogging system or something). second, you want to use a CMS.
The problem with that, I think, is these two things are inherently unrelated. It feels like it's similar - you manage your content with the CMS, just like your users manage their content, but it's actually completely different. One is a tool for developers to quickly build a website, the other is a limited set of tools within an existing website that's exposed to the user. You will never want to expose any part of the CMS to your users, you'll want to have control over that, so it really doesn't matter if you use a CMS or not.
in short - sure, you can use any CMS to build your website, and you can build it from scratch. I'd prefer the latter cause I like building stuff from scratch, but it's really irrelevant to what you're trying to build.

Solution to raise the amount of products( quotedetails or quoteproducts) in Quote entity via modal

I want to add a Button in the ribbon of Quote,
When the user clicks on that, A modal displays, with two fields.
One is quote product categories that exist in that quote, that means it searches in quote product of the quote and find all the categories exist in that specific quote and then display them in a combo box. with their guid or something like that.
Another field is a textbox, which is percentage.
something like .
The end-user clicks on the ribbon button, the modal appears, he/she gives a number to the percentage and select one of the categories; when presses apply button, it find and return all amounts of the quote products in that quote that matches the user selected category, compute some amount based on quote total amount and the returned amounts and and insert that computed number into a field in each quote product named overed_amount.
How can I handle this? JS or Plugin?
I prefer to this via JS rather than writing plugin, But can I pass parameters between this HTML or JS file to CRM Form/Forms?
And does anybody have any sample? like this? any suggestion?
I googled and most of Plugins are about writing simple plugin based on existing code.
Can I display modal via plugin? Any suggestion or advise? or sample?
Plugins (and custom workflow assemblies) run as part of the backend platform. The only "UI" component they have is they run synchronously and throws an Exception, a popup will show that Exception to the user.
The typical way to add custom UI components is via custom web resources.
In custom web resources you can do HTML / JS / CSS, and even leverage 3rd party libraries such as KendoUI. You can add them to the form or open them via a ribbon button.
A custom web resource can typically interact with the main Dynamics 365 form via the parent property (as the above linked article describes).
One library that can help with displaying custom web resources in D365 is Alert.js, though as the documentation says, it's unsupported.
If you want to include some backend operations as part of the custom UI, you can create custom actions and call them from the custom web resource's JavaScript.

How to create hyperlinks that pre-select data filter category?

I have a question regarding data filters. Specifically, how to tag data filters in a way that lets me create hyperlinks for those filters, so that when clicked, the link will open the page and pre-select that filter from the portfolio.
I am using WordPress with the Avada theme for this site in question. I have reached out to their support team, but this request falls out of scope with what they will assist.
I have very limited knowledge of JS and PHP, but I'm not opposed to digging in and figuring out how to edit. I just need to know where to start.
Let me give you an example. Take the existing category "Government" on this dev site (see image below).
The Avada filter loads it as: <a data-filter=".government" href="#">Government</a>. Is there a way to automatically label the href as the category? So that the html would then read, <a data-filter=".government" href="#government">Government</a> so I could create hyperlinks to pre-filter to that Government category?
Please let me know if I can provide any other details on this to gain assistance. I appreciate it!
Here is a screenshot of the actual site I'm trying to edit, with notes.

Fully custom lightbox in dhtmlxGantt

Hi there,
I'm looking at using dhtmlxgantt as a way of building up an itinerary i.e. you add items at specific days throughout a period (most likely 2 weeks)... However, there are quite a few extra variables that I need to store along with the standard info of dates etc. There are a series of 4 dropdowns which populate the next one via AJAX.
I know I can add custom controls into the lightbox but these will not work via AJAX when the previous dropdown is changed. I was hoping that I'd be able to make a fully custom lightbox which then passes everything back to dhtmlxGantt but I can't seem to find away...
It looks like it's possible in the scheduler product (http://docs.dhtmlx.com/scheduler/samples/02_customization/16_custom_form.html) can we do the same with Gantt?
Thanks in advance,
Adam.
You can just redefine gantt.showLightbox method and show your form from there. And then use public API to save changes - gantt.addTask, gantt.updateTask, gantt.deleteTask
Here is a crude example:
http://docs.dhtmlx.com/gantt/snippet/5e134aa1

block web parts in sharepoint from certain users

I'm looking to see if it's possible to block certain data in web parts from loading or showing for certain users?
I have a SharePoint page that was written in asp.net and JavaScript. What i have is a page that runs several queries and displays them as separate web parts. I would like to be able to block certain web parts that show financial information to only show for the managers group.
I am able to just hide the web part from showing at all but that isn't necessarily helpful.
any help at all would be greatly appreciated.
thank you!
I would create a hidden div that contains the users access level (or I guess you could use an array to hold / define unique users who should or shouldnt be able to to 'see' the parts)... then just write a function that reads the hidden field and based on the user who is viewing the page, show or hide the content based on the id of the web content element / part.
I would probably try to do this on the server side though before the content in question is sent to the dom.
good luck
A possible solution could be is to hide the webparts using audiences. Edit the page, edit the webpart, navigate to the properties, in the Advanced section you'll find something called "Target Audiences". Either use an existing audience (which you can create in the user profile service application) or enter a SharePoint group name (like the site members, of something alike 'managers'). Members of that group/audience will see the webpart then. Other users will not see the webpart.
Notice that this is not a security measurement. E.g. it's just preventing the rendering of the webpart, it's not preventing users from accessing the data if they know where it comes from.
Read more here: http://office.microsoft.com/en-us/sharepoint-server-help/target-content-to-specific-audiences-HA010169053.aspx

Categories

Resources