Is there a way to use Custom Parameters of an Event as a metric in Facebook Analytics charts? - facebook-analytics

i am sending parameters with my custom event. I would like to demonstrate them as a metric in the graph charts. Is there a way to do that?
For example, when i send an event with additional parameters of secondValue, thirdValue.
I would like to decide which value to use as a metric without being limited to these three metrics:

There's no way to do this currently. Your best bet is to send multiple events (firstEvent, secondEvent, thirdEvent) instead of multiple custom parameters (firstValue, secondValue, thirdValue) and use the valueToSum argument for each event.

Related

How do I get data to both UserID view and Normal view in Google Analytics

Using GMP, I'm firing events from my back-end system to GA, with an associated UserID. Essentially I'm measuring conversions on lead forms as the leads are manually processed and registered in the back-end system and either generate sales, or don't.
The events I'm firing are visible in a UserID view, but not on my normal views. I understand that this is because I'm assigning a UserID when I fire the event. My question is: What is the best way to get these events to show up in my normal views as well? I'd like the data in both views, for different purposes. Should I fire double events, one with and one without the UserID?
The current package looks like this:
https://www.google-analytics.com/collect?
v=1&
t=event&
tid=[GA_TRACKING_ID]&
uid=[USER_ID]&
ec=application&
ea=submit&
el=[APPLICATION_ID]&
ev=[OUR_ASSIGNED_VALUE]&
cd1=submit
Any suggestions are very welcome!
You have to pass it as custom dimension with user scope.

Submit slack modal with block elements

On my modal view I have two datePicker elements. I know that payload with action information is sent after each interaction, but is it possible to pass all selected values after form submission?
I only came up with solution where after each interaction selected value is cached on the server side and bound to view_id.
Hi you can achieve this by placing your interaction component inside input block type. Slack documentation says.
Any interactive components used within input blocks will not send this block_actions payload. They are included in view_submission payloads only.
https://api.slack.com/reference/interaction-payloads/block-actions
An example I have created in block kit
If you do not need to receive the block_actions events, then use input blocks like GJoshi suggests.
But if you do need the block_actions events, then you cannot use input blocks (per https://api.slack.com/surfaces/modals/using#interactions). In that case, you can add the value to the private_metadata field via the views.update call. When the user clicks the submit button, the view_submission event payload will contain the private_metadata field.
For folks who stumble upon this as I did, the answers above are no longer up to date since now slack allows input blocks to dispatch block actions. The approach of using private_metadata is still relevant in some scenarios, but just receiving block actions makes life much easier.
Simply set "dispatch_action" to true when defining a specific input block to receive a payload whenever it gets updated.
Once the user submits, you will still have access to all the values of the input data

Separate data received from various senders in Veins/OMNET++

In my scenario, a receiving vehicle gets BSMs from multiple senders. I need the BSM data recorded separately according to their respective senders.
Currently, I am achieving this using a custom logging system. However, since OMNET++ has a sophisticated logging system built-in, Is it possible to achieve what I need using OMNET's built-in tools?
OMNeT++ vectors log 2-tuples (TV: time+value) or 3-tuples (ETV: event+time+value) for each piece of data. You can use this additional information to find which values have been recorded at the same simulation time or as a consequence of the same event.

Difference between Event Aggregator, Commands and Request/Response

I'm trying to use Backbone.Marionette, and I read the docs on github about wreqr.
So, whats the difference between Event Aggregator, Commands and Request/Response. And when to use one or another?
They bascially all use messaging, and their difference is mainly semantic:
event aggregator: send a message when something happens. Code somewhere else might be listening for that message, but maybe not
request/response: have code send a request, and it will expect a response (e.g. send me refreshed data)
commands: code in one place commands code somewhere else to carry out an action. There usually isn't a return value.
I would like to add to David Sulc's answer.
Request/response is very different from event aggregator and commands. It is used for cases where one part your code requests something from another part of the code. A response would always be expected. Now lets see how event aggregator and commands are different.
Marionette's Event Aggregator allows you to implement publish-subscribe behaviour. Using the 'on' method you can subscribe to an event and bind an event to any object. You cannot implement this binding behaviour using commands. Also you can have multiple objects listening to any particular event. There may also be a case where no object is bound to or listening to any event.
Commands are specifically meant for performing some action in some other part of the code. There can only be 1 handler for a particular command, unlike events where you can have multiple listeners.
So to summarize, the use cases for each would be:
1) Request/Response: When you need some response from another part of the code.
2) Event Aggregator: When you want to bind objects to events
3) Commands: You just want some other part of your code to perform a task.

How do I get the event that took me to state in Spring Web Flow?

Suppose that I have a view-state targeted by many states. So many of them will have transitions with destination this state. For some of them, I want to display certain data on the page. So suppose if from state A->B then don't display, if C->B display.
I thought that if I knew the event that triggered the transition, I could easily do this... but I can't find a way (I am new to SWF).
Do you know how to do that? Or alternative ways to get the same result?
I've done something similar to this using a FlowExecutionListener. FlowExecutionListenerAdapter is provided as a base class for adding behavior on transition, state change, etc. An example of how to register such a listener can be found here in the docs. Each method is passed a Definition that contains meta data about the event. From that meta data you can determine if the event is one you're interested in and execute your custom logic.
Hope that helps.

Resources