Google Tag Manager Trigger for users who visit random 2 pages on a website - tags

I am trying to set a trigger that would be fired if users visit both page 1 and page 2 on a website. No matter which page they visit first, as long they visit both pages.
Example: Homepage URL: shop.orgalife.com
Page 1: shop.orgalife.com/collections/page_1
Page 2: shop.orgalife.com/collections/page_2
However, I tried to use trigger type "trigger group" with 2 child trigger page URL contain specific page_1 and page_2 (they are both on page URL) and it does not work.
Is there any way to configure a trigger that would fire successfully?
Thank you all
What is the best trigger type when we want to have more than 2 conditions (I watched many tests for scroll and timer at the same time and It always easily works but don't know why click event or page view event never work)

I would suggest you can set an item in localstorage when user visit page1.
Then when user goes to page2. Check the localStorage is exist or not. If yes then fire your code.
You can check the Referrer in the page2. If the Referrer is page1 and it can fire the tag you want.

Related

Track form conversions confirmation page URL is the same as the form

I'm trying to track form completions on a page where the form's URL is the same as the confirmation page.
Form Page
Does anybody know if this can be done with Google Tag Manager/Google Analytics please?
Completion page
Simply tracking clicks of the Submit button will result in false positives because sometimes people will not type the security code correctly.
Is there a tracking code of some sort that can be added to the confirmation page, so that each time it loads the count goes up one?
I'm grateful of any help you can provide.
Thanks!
You can use the built-in visibility trigger - e.g. as soon as a link element with the link back to the homepage becomes visible you let the trigger fire. Specifics depend on the CSS id or class for that link (if any, else you'd have to test the click text).
In the visibility trigger you might have to enable "listen for DOM changes" if the confirmation message is loaded per Ajax (as opposed to just have their CSS display property set to 'none'.

Creating a Form that lets the user review what they entered before submission

I am trying to create a Form that lets the user to review what they entered before submitting the form. The first page will let the user enter what they want. The second page will show what the user entered. The second page will have two buttons. one for make changes and the second would be for submit. The third page will be the final summary page and will let the user print the form.
What i tried:
I created all the fields on first 1 page manually and then passed everything to page 2. I created a branch on page 1 to pass the values to page 2. Page 2 was connected to the table in which all the information is stored in. Page 2 had two buttons. One button was to make changes to page 1 and second button was to submit. Page 3 was just a summary page which allowed the user to print. It worked nicely but i later realized that if someone used a comma or pressed enter to start a new line in one of the fields then it will give me errors. This problem was occurring because i used a branch.
What i want to do.
I created a temp_table which is exactly like the main_table. The first page will be connected to the temp_table. The second page will be connected to a view on temp_table to show what the user entered. Page 2 will have two buttons called make changes and submit. Make changes will take the user to page 1 so the user can edit what they entered. Submit button will transfer what the user entered from temp_table to main_table (I believe we can use a process that runs a query to transfer data to main_table whenever the user presses submit). page 3 will be just a summary page that will let the user make changes.
I don't know how to approach this. How do i make the Make Changes button work? Any advise?
Note: I am very new to apex so i apologize if i made any mistake.
Thank you and any help will be appreciated.

How do I proceed with creating a panel which can search a page in wicket and redirect to the same

I am trying to do the following:
I already have a menu with several drop downs in wicket right now. However the number of entries have become very large in the drop downs, one has to remember headers under which a particular page exists. I would like to create a landing page, which would have a search bar in which we can type in the page name and I should be redirected to the desired page.
Can anybody give me any pointers of how to proceed with this one? Thanks!
You can consider to use AutoCompleteTextField to show user the available pages. Then, after user has selected a page, you can redirect him/her to the page.

Facebook share link, remote iframe click event capture

I am working from last 24 hours to accomplish this, i can't capture the fb share link widget iframe click event, i need to perform an operation over it. If its not possible due to cross domain, even then i need some logic to get a click event triggered on the parent div of this iframe, parent div is in my DOM element.

Wicket page versioning and history support

Could anyone explain me what is the Wicket's page versioning useful for? There is an article in the FAQ that is related to this topic:
Wicket stores versions of pages to support the browser's back button.
Suppose you have a paging ListView with links in the ListItems, and you've clicked through to display the third page of items. On the third page, you click the link to view the details page for that item. Now, the currently available state on the server is that you were on page 3 when you clicked the link. Then you click the browser's back button twice (i.e. back to list page 3, then back to list page 2, but all in the browser). While you're on page 2, the server state is that you're on page 3. Without versioning, clicking on a ListItem link on page 2 would actually take you to the details page for an item on page 3.
But unfortunately I don't understand it at all. When I click on a ListItem on page 2, I would expect to get to the page defined by that Link - details page for the item. Why should I get on the details page of the item on page 3?
Moreover, when one press the back button in a browser, it doesn't call the server at all. Is it right?
So how this versioning works?
No, the server is not notified when you press the back button. I'll try to explain what happens in the example:
You access you application for the first time. On the server, a page 'list' is created, used to render the HTML you see in your browser, and stored as page v1. You see the first 10 items of the list.
You click the 'next' link, and it refers to a link in page v1. On the server, page v1 is loaded, the link logic is executed (to advance the pagination), the page is used to render HTML, and is stored as page v2. You see items from 11 to 20.
You click the 'next' link, and it refers to a link in page v2. On the server, page v2 is loaded, the link logic is executed (to advance the pagination), the page is used to render HTML, and is stored as page v3. You see items from 21 to 30.
You click the 'details' link for item 25, and it refers to the link for the 5th item in page v3 (this page only shows 10 items, and the link, even if it refers to the 25th item in the complete list, in this page it's just the 5th). On the server, page v3 is loaded, its logic is executed, page 'detail' is created, stored as page v4, and you are redirected to it. Your browser requests page v4, the server loads it, and uses it to render your HTML page (no new version is stored, since it's just rendering). You see the details for item 25.
You click the browser's 'back' button 2 times, and see page 'list' showing items 11 to 20, referring to page v2 (list). Then you click a link 'details' for item 13. On the server, page v2 is loaded (not v4, the last one executed), since the link clicked pointed to this page version. Then, the 3rd item link's logic is executed, a new page 'details' is created, stored as page v5, and you are redirected to it. The browser requests page v5, the server loads it, and uses it to render your HTML. You see the details for item 3.
All this may seem strange if you come from a Struts-like background, where you always just put the item id or which page to show as a link parameter. In Wicket, the usual case is to store all state in the server, and navigation is not done by the client (direct link to another page passing parameters), but in the server. A link just asks the server to execute code in a page object version, the navigation is done all server-side.
You could argue that the Struts style is simpler (and you can do it in Wicket too, it just isn't optimal), but keeping the state only in the server has many advantages. Fist, once you get used to it, it's actually much easier. No need to add every single param to a pagination link (search parameters, first item, page length, sorting column, order direction, etc.). Also, you avoid many security issues (you can't just change the URL id param to an arbitrary value and access other users' data), and can control everything from Java code instead of mixed Java-Javascript (you still can do it if you want, though).