In GA4 is it possible to create custom user/session acquisition properties? - google-analytics-4

I like the new user acquisition properties, for they do what I think. Tell me how the user first came to the website.
Is it possible to add custom user acquisition properties to add to the data collected. e.g. the first page they ever visited ('user page location'). This could help value pages.
There are the user custom properties but as far as I can see they don't show up in the relevant reports, and I'm not sure how to only set them on the users first page view.
A similar 'session page location' would also be of use, like the landing page report in Universal.

Related

tiki-wiki: how do i force newly created pages into a category based on the user's group?

I need for certain users to only be able to create pages in certain categories based on their permissions. One reason for this is approvals ("flagged revisions"). If a user can create content outside of any category, then it could show up live on the web site. Even thought it wouldn't initially be linked anywhere directly in an existing page (except other unapproved pages) this can still be a problem.
I can prevent the user from creating a new page in the global scope (apparently this corresponds simply to "edit" permissions as I don't see a special permission for creating new pages), and then I can grant them permission to edit pages in the category their group is authorized to edit. But I can no longer see the "Menu:Wiki:Create a Wiki Page" option, and I can't figure out how to allow the user to create a new page in that category.
I can edit the group and set the "Default category assigned to uncategorized objects edited by a user with this default group" to the desired category. When I do that, a user in that group now has a "Create a Wiki Page" option show up in the Menu:Wiki sub-menu, but clicking on that does not bring up a new page for editing; instead if just brings up a list of existing wiki pages, without the option to create a new one!
If I create a link to the new page from an existing page, I am unable to edit it in any way. Clicking the link takes me to a page which indicates that the page does not exist, but which does not provide any way to edit it. Putting the title of the page directly in the URL, as in tiki-editpage.php?page=New+Page+Name brings up a "You do not have permission to edit this page" error page. Since any new page created by the user should have the category they have permission to edit, this does not make sense unless the category isn't set until after the initial edit permission check occurs, which creates a catch-22!
How do I let the user create a new page in any of the categories they have permissions to edit in?
If Categories are not the best tool for the task that's okay too. I don't really understand the difference between Categories and Structures with regards to which is better for what I'm trying to accomplish, however it seems Categories are the more "native" feature, which is why I am trying to use them.

How to link multiple pages in GWT

I am new to GWT and so my knowledge is restricted.
Right now I have created a simple Login page which will take my user to another page and then based on the choices that the user makes, it will direct it to the next page. I have created 3 individual pages but I have no clue how to link them. Can someone please help.
In GWT typically you do not create separate pages - you create separate "views". They may look like pages to an end user, but in reality the entire app works in a single HTML "host" page.
You may want to look at the Activities and Places design pattern. It takes care of navigation between different "places" within your app.
very simple example with a DeckPanel. It shows only the selected 'page' and hides the other ones
DeckPanel deckPanel = new DeckPanel();
deckPanel.add(page1);
deckPanel.add(page2);
deckPanel.add(page3);
deckPanel.showWidget(0);
//deckPanel.showWidget(1);
//deckPanel.showWidget(2);

How to hide a page based on the logged-in user in CQ5?

I want to hide a page in navigation component based on the logged in user. I have two approaches in mind. Set permissions on the page's node in CRX-DE; denying it for all users; and then allowing it for specific groups. I have been trying it; not found much success. Else; I can get the id of the logged in user in the jsp and based on the user group; I can set the page's property 'Hide in Navigation' . But I am not able to find how to set that property in jsp. Please suggest.
Edit:
I am using the default authentication.I wanted to hide a page from navigation in the default 'list' component. If I use CUG; the users belonging to that group will still be able to see that particular page's link in the list component; and would be asked for login on clicking on that page.I want the link itself to be hidden if the user belonged to a particular group
Thanks.
If you are using the default authentication features in AEM (like Geometrixx), which rely on users that exist in AEM, you can use Closed User Groups. CUG allows you to set what users or groups can or cannot see a specific page. You can see where to set CUGs in the page properties dialog for each page. I'm pretty sure CUG settings inherit down the page hierarchy as well.
Using the JCR permissions for this is a good deal more complex, because it's such a low-level architectural thing. However, for more complex solutions, sometimes it's a necessary part of the equation.
I agree with ryanluka that going for JCR permissions should be avoided when the problem can be solved by much simpler approach. I modified the list.jsp of the default list component. Extracted the login user's id using Userpropertiesutil; and based on the group; wrote the code in jQuery to remove that particular page's div from list component.

Callback from Facebook app as a tab app on multiple pages

Salon owners can create an account with their salon information on our platform and they get a page that they can use as a tab app.
I want to be able to serve all these pages from one app instead of having to install each one seprately and I also want to make the life of the salon owner easier by helping them to install the tab.
I know about the link I can create to help them install the app and I know that when a visitor visits the app that facebook will send the page ID. So far so good.
https://developers.facebook.com/docs/appsonfacebook/pagetabs/
But how do I make sure that when the salonowner follows the link to install the app that I get the page ID back (through callback or other) so that I can register which page ID belongs to which salon account.
I've read sone 2011 article about a callback but I can't find any recent info on this.
I think it should be possible as a lot of sites offer easy fb apps to businesses.
Any help would be welcome!
EDIT: Could this last piece of info in the Facebook link above be used to do this? I don't quite get it yet.
In addition, your app will also receive a string parameter called app_data as part of signed_request if an app_data parameter was set in the original query string in the URL your tab is loaded on. It could look like this: "https://www.facebook.com/YourPage?v=app_1234567890&app_data=any_string_here". You can use that to customize the content you render if you control the generation of the link.
Well... Preventing users from adding your application to their page is impossible. You can't prevent that.
What you will be able to do is to detect who has added your application and according to that, change the content (or not display it at all). So you'll have to start with a list of "allowed" page_ids to match to the accounts you want.
Your application will receive a signed_request each time a user arrives at your application (within a page). Inside that signed_request is information not only on the user but also on the page that the application is on (provided it is a page tab app).
Once you have obtained the signed_request, it will hold a page key which contains:
A JSON object containing the page id string, the liked boolean (set to
true if the user has liked the page, false if not) and the admin
boolean (set to true if the user is an admin of the page, false if
they're not). This field is only present if your app is being loaded
within a Page Tab.
So you'll be able to access the page_id from within this variable and make a decision on the type of content you want to be displayed.
Ok, after running some tests I found out that when you add a URL as 'next' parameter to the install URL Facebook will send the admin(user) back to this URL while adding an array to the request containing all the page Id's the app was installed to.
Like this: YOUR_CALLBACK_URL?tabs_added[ID]=1
Proved to be quite easy in the end

Adsense with dynamic content

I know that this topic has been discussed before in varying extent but I have some specific queries. I will use an example for this case and would like to request you for your views.
Example:- A home finance management website. There are two pages. The basic page after login is an empty page with a text box. Type in "Rent" and rent details and trends pop up. Type in "Bills" and bill details and history pop up. The data shown to user is different of course.
Now -
1. If I place an Adsense script in the basic home page where I just have a text box, will it be disqualified for not having enough content ?
2. Even if the content changes (AJAX), does the ad change to suit the content ? Does the crawler keep a constant check of index the pages after defined intervals and whatever it finds there is kept and searched for keywords ? The same page may show different content to different users and hence have different keywords. (Also, since login would be cookie based, how does crawler see this page ?)
Edit -
I know from HERE that Google does take AJAX calls into account but since the results would be dynamically populated by accessing a database and while populating unique data, the bot looking at the form action page doesn't help much, does it?
3. Google prefers GET method. So if I go like this - xyz.com?show=rent / xyz.com?show=bills, the page is regenerated and the script reloaded but each time the crawler sniffs any one of the two pages, it might see different content for different users. What does it do ?
4. If I do not reload the page by form submission and the page is not regenerated every time, can I call a function to document.write the div I am putting the ad in ? Would that make it re-sniff the page ?
Any help is much appreciated.