Is there any button click event in Sitecore Tracker in version 9.1 - sitecore

I am looking for a personalization event that have to occur when a click event takes place.

No, there is not and you have to track your button click event on the server side in Sitecore.
Add an onclick() JavaScript event to your button to make the server call and pass details about the clicked button. Then register the click event as a Goal on the server side.
You can create a Goal and then trigger it as a pre-built Sitecore event using
the Sitecore.Analytics.Tracker.Current.CurrentPage.RegisterGoal() method to register your Goal against the current page as follows:
var goalId = "{Your Goal ID}"; // ID of your goal
var goalDefinition = Sitecore.Analytics.Tracker.MarketingDefinitions.Goals[goalId];
Sitecore.Analytics.Tracker.Current.CurrentPage.RegisterGoal(goalDefinition);
Read more about the pre-built events in Sitecore here.

Related

How can I refresh and show/hide buttons in Buttons Container in Modal Dialog in Oracle APEX based on an Item Value?

In Oracle APEX 22.1 (Oracle Database EE 21c) I have a Modal Dialog Box which has a button container with several buttons. These buttons are being shown or not, based on a item in dialog box variable that is 0 or 1.
When I press the button "UnDelete", a Dynamic Action of PL/SQL execution type is fired, change the value of a field in the database and then two another Refresh True Actions follow. The PL/SQL execution type changes the value of the field in the database of a table successfully and the first dynamic Action refreshes a Classic Report Region on the Modal Dialog Box showing the new correct value of the field.
The second Refresh True Action tries to Refresh the Button Container Region of the Modal Dialog Box in order to hide the button "UnDelete" and show the rest buttons, which all are Server Condition based on this variable value. The Refresh does not take place(maybe the Button Container Region does not support the Refresh Event or does not propagate it to its Buttons)?
How can I achieve this effect?
Thanks In Advance!
I tried the Refresh Action for the Button Container Region of the Modal Dialog Box,but the buttons are not shown/hide accordingly.
"Refresh" is not relevant for a button container. The "refresh" action in apex does an ajax call to refresh the content of a report - it just re-renders a part of the DOM containing data. Currently only the data rendered by a component can be refreshed using partial page refresh. A button can never "refreshed", it is rendered in the page rendering process and from then on it lives in the DOM for the lifespan of the page.
A server side condition is evaluated at page rendering time. If a server side condition yields false at page rendering time, the component is not included in the dom. So, they cannot be shown using a dynamic action afterwards (because they're not in the dom) and they cannot be re-evaluated using a dynamic action (because the dynamic action can only manipulate the dom and that condition was evaluated before the dom was rendered).
The solution to you problem is to use show/hide actions in a dynamic action for each of the individual buttons for the reasons explained above.

Can i create a "OnClick" in toast action from UWP?

I need to catch in background this click, when i use OnActivated, the app open. I don't want the app to open when I click on the action
Sure UWP notification active type contains Background, that means you could call registered background task to process the corresponding content instead of starting the foreground app after click the toast.
UWP can set the notification active type when sending a notification:
var content = new ToastContent
{
Launch = "...",
ActivationType = ToastActivationType.Background
};
var notifier = ToastNotificationManager.CreateToastNotifier();
var notification = new ToastNotification(content.GetXml());
notifier.Show(notification);
For detailed information about background notifications, you can refer to these documents:
Handling background activation
Support your app with background tasks
For using above ToastContent api please install Microsoft.Toolkit.Uwp.Notifications nuget package* for more detail please refer to Send a local toast notification from C# apps

How to track click event on server side in sitecore

How to track the user click event on the server side in sitecore?
Our requirement is to track few external clicks on the site and register them as goals. I can track the clicks through client side js script but then I would like to achieve this through server side. Any idea as to how to track?
Which event\processor actually holds the clicked links info/?
There are no events and no processors which are execute when a link on a page is clicked.
You have 2 options if you want to register external link click as Sitecore goal:
Add onclick javascript background call to the server and send the information about the link which was clicked. Then register it as a goal on server side.
Create "External link" item in Sitecore and link to that page instead of linking to the external page directly. Then add a goal to that page and instead of displaying it, redirect client to the external site.
A click to an external page will not pass through Sitecore anymore, so the system will not be able to track that ootb. Like Marek said, you have a few options to do this yourself. I wrote a blog post on it (https://ggullentops.blogspot.be/2016/02/integrating-addthis-with-sitecore-goals.html) a while ago explaining (with code) how to do this with javascript on the client and a controller to register the goals on the server.
We just post to the controller which takes care of the triggering the goal. Code in short looks like this (check the post for full code - also with obligatory null checks):
var visit = Tracker.Current;
var page = Tracker.Current.Session.Interaction.PreviousPage;
var registerTheGoal = new PageEventItem(goalItem);
var eventData = page.Register(registerTheGoal);
eventData.Data = goalItem["Description"];
eventData.ItemId = goalItem.ID.Guid;
eventData.DataKey = goalItem.Paths.Path;
Tracker.Current.Interaction.AcceptModifications();
Tracker.Current.CurrentPage.Cancel();

Regarding stopping page reload when button clicked

I am working with Oracle Apex 4.2 where in i have a page which is Page1 and within the page i have a report region and a button. When i click on the button a Skill Builder Pop-up plugin hits up and a popup window opens up where in i created a form on another page which is Page2.
I am adding a JavaScript page refresh for Page1 and it will automatically refreshes the page at particular intervals. Code is as follows:
$(document).ready(function(){
setInterval(function(){cache_clear()},10000);
});
function cache_clear()
{
window.location.reload(true);
}
But when i click on the button, the page refresh on Page1 should stop and again it should get activated after closing the popup only.
Any help would be appreciated.
To stop process when button click use clearInterval() function.
Refer discussed thread Stop setInterval call in JavaScript
for more details.

how to prgramatically trigger mouse click in c .net

I am new to c++.net. I want to programatically trigger mouse click event of webBrowser, the reason is that I use the webBrowser control to display the .ppt file and I want it to automatically jump to the second page without clicking the mouse. Is there any way to trigger the mouse click event programatically?
thanks.