tealium button click track - analytics

I have an application page , where clicking on button "find product" , goes to search products page with a list of products mapped search criteria selected on previous page.
page 1. search criteria, "find product" button
page 2. products list matching search criteria
I would like to track "find product" click event. As soon as find product button clicked, user will be navigated to page 2.
Not sure, if a page load is occurring on a button click, will I be able to capture and track button click event ?
I am thinking to use "utag.link" implementation for this.
May be I am wrong, any suggestions helpful.
-Thanks.

You could add the utag.link event on the mousedown interaction to give you a few milliseconds head start on the tracking.

Related

Prevent click on other item than the swiped item

TLDR;
How to prevent click on other item when there was already an item swiped open or was going to close.
Every item in the list has detail page (upon tap/click) and swipe-able.
Actual behavior
Swipe on the item (Burt Bear) to reveal the option.
Tap/click on the swiped item (Burt Bear) area (not the Delete) to remove option, works fine.
Actual usage
Swipe on the item (Burt Bear) to reveal the option.
Click on the item OTHER THAN the swiped item (Charlie Cheetah) and expect to remove option. BOOM! The detail page for the clicked item (Charlie Cheetah) was shown instead.
Fact
The actual usage was based on iPhone Whatsapp app. When u swiped a chat, then u tap on other chat, it will close the options and WILL NOT open the chat you just tapped.

AngularJS: Pagination - restore pages loaded on navigation

I have created a page where there are 2 section (2 controllers and 2 views).
The section in the left has categories (category_selector), and the section on the right displays items in the category that was selected in the left section (category_item_display).
There are many items in a single category, so pagination is implemented in category_item_display.
Pagination works by loading 20 items and then shows a button 'Show More' if there are more items in the category. Clicking the button will add another 20 items to the page.
When an item is clicked, the page is changed to item details page and the item details are displayed.
Now here is the problem.If I click on 'Show More' button once or more, then more than 20 items are displayed in category_item_display. But once I navigate to item details page and then click back button, again the controller loads and shows only 20 items in category_item_display.
So what I did was that the number of items to be loaded is checked from a URL parameter 'loaded_items' first, and if not found then default 20 is picked.
A URL search parameter 'loaded_items=' is added to the address when an item is clicked, and then the address is changed. I did this by having both ng-ref and ng-click on the anchor element, so that ng-click will execute first which has $location.search('loaded_items', count);
I did not want to store the loaded items count in the URL as soon as 'Show More' is clicked, because if I select another category the loaded items will be as per this count.
I want to remove the URL parameter 'loaded_items' on controller init after recording the value somewhere so that the list can be retrieved. But $location.search('loaded_items', null); is reloading the page again and hence the loaded items seems to be items loaded repeated twice.
How can I achieve this?
Thanks in advance
Balu
As told by jbrown, I added the items to the service. Along with it,
ng-click call back will add the selected item id to the service. Now
when I click back button, the item list will be unaltered because it
is in the service. Using $anchorScroll in $timeout, the screen can be
scrolled to the exact item (using id) that was selected.
Thanks everyone.

MS Access 2016 Open Record on Click and Then Be Able To Go To Previous Or Next Record

Long time reader first time poster here. I have basic knowledge of access coding but nothing fancy. Anyways here it goes. I have coded on click from a Tubular List in access of our products table to be able to open up a certain specific file. When I click on a product name or SKU it does just that and opens that specific record for me called (Product Profile Form). AWESOME! I have on that Product Profile Form Next and Previous Buttons to go to the next or previous records. But if I go through the Product List and click on the Product Title. It Opens and If I then click Next or Previous record Button it first shows a blank Product Profile but on the next click it says "You cant go to that specific record" in a pop up. The Code Macro I have on the Tubular Product List Form is
/ Form Name: Parent Product Profile Form /
View: Form /
Filter Name: /
Where Condition=: ="[Product Parent SKU]='" & [Product Parent SKU] & "'" /
Data Mode: Edit /
Window Mode: Normal /
Parent Product SKU is The Primary Key Field Name in my ParentProductTable
I have tried and tried to figure this out for hours online and here.
Thank you all for any help.
Ok I solved it myself and if anyone else has this same issue the resolution is this. Make a command button on your form. You will have to run a few different macros for the on click event for the command Button. For the Next Record Button After clicking where you want your command button to go on your form the Command button wizard will pop up. Choose Record Navigation in the categories box and then choose Go To Next Record in the Actions Box. Finish the Command Button Wizard. Then Right click the button and choose Build an event. This will open the Macro Tools. Click add new action and choose the Macro RemoveFilterSort.After that if you hover over the macro RemoveFilterSort you will see green arrows to place your macros in the order you want. Click the green arrows up until it is first at the top. Click Save and then exit. Now you should be able to go to the next record. Do the same for the previous record except in the command wizard pop up choose Record Navigation in the Categories area and then choose Go To Previous Record instead of like before we chose Go To Next Record. I am using Access 2016. What you basically did is told the button to remove the filters before moving on to the next or previous record. If you dont want to make command buttons and use the access supplied navigation buttons at the bottom. You can make a command button with the macro RemoveFilterSort only and you will have to click this button to remove the filter then you can click the Access supplied navigation button. I hope this helps someone.

Click button until button disappears from webPage

I have web page in which it displays only 10 items if there are more then 10 items on the page then show more button displays, so need to click on show more button to see more then 10 items.
Problem is when I click on show more button it will display 10 more item and then again i have to click show more button to see next 10 more item and once all items are displayed on the page then show more button disappears from page.
Here I want to click show more button until all the items are displayed
How to achieve this using Selenium + Web driver?
Until "show more" button present keep clicking on that link in loop.
while(isElementPresent(By.linkText("Show more"))) {
driver.findElement(By.linkText("Show more")).click();
Thread.sleep(100);
}
Check here for isElemenetPresent() methods implimentation.
P.S : For safety break the loop after reaching some max limit.

How can I go back to a search result table that is in a partial view?

I'm working in a ASP.NET MVC project that accesses an SQL database and allows the user to search and view the data. Let me describe it:
I have a view with a search filter. When I click in a search button in this view, the controller returns a partial view with a table with some data, which appears below the filter. Then, I can click in an actionLink of a row to go to another view with the details. In the Details view I have a "back to list" button.
When I click in "back to list", I want the view, that has the filter and the partial view, to appear exactly as it was before. How can I do this?
My "back to list" is an actionlink that goes to the view. The problem is that, when I click in "back to list", the partial view with the table doesn't appear because it is necessary to click in the submit button first. How could I force the submit button through the controller?
This isn't really a problem that is solved inherently with MVC. It's really just a state concern, where you need to persist the state of a page, and resume that state when coming back to it.
This can be solved through typical means of persisting state between pages:
1) Save your search criteria in the session, and retrieve them when returning to the page.
2) Pass your search criteria through the link to the details page, and then again on the "back to list" link.
And (as the comment below points out), you'll of course need to then use the values from the session/querystring to run the search again and render the search results to the view, just as you did when you originally performed the search.
The easiest way is open the link content in another tab... using Clic here
Client side option:
You could load the content of the link in another container <div>... hiding the one that holds the search results and filters. Then, when user clics "Back to search...", you just show the container with the search results and filters, and hide and clean the other container.
This code is not so hard, and you don't need to go to the server again.
If you are OK with reloading the page, #Jerard Rose, in his answer, explains 2 other approachs that involves re-loading the search results, querying again the database.
Values can be transferred between pages in many ways such as: Session, QueryString, Public property, Cookie, HTTPContext.
Perhaps you are calling a 'details' action to travel to the details page. What can you do is that,
1. When you go to the details page, store your search filter value and pass it to the details page. so that when you return to the previous page you can get back/pass the values again if needed.
2. Now if you click 'back to list' button pass the values that you already have for filtering to your desired action which is responsible for the partial view.
3. Do the same thing that you did while clicking on the 'Search' button in the action.
Hope this will help
Thanks

Resources