When function is pushed in googletag.cmd.push will be invoked - google-ad-manager

Use case
I want to check when requests for ads are being sent from GPT.
Suppose for any ad slot s1, ad request sent at time t1 then I would like to print t1-pageLoadTime on the console.
googletag.cmd.push(function () {
// log time
});
But, I am not sure whether the function pushed into googletag.cmd.push will be called before sending an ad requests or after sending all ad request.

According to the official documentation googletag.cmd is just "the global command queue for asynchronous execution of GPT-related calls."
I wouldn't rely on this knowing Google Publisher Tags provide events such as :
googletag.events.SlotRequestedEvent : "This event is fired when an ad
has been requested for a particular slot." (here)
googletag.events.SlotResponseReceived : "This event is fired when an
ad response has been received for a particular slot" (here)
Launch a timer between slotResquestedEvent and slotResponseReceived, you will be able to get the duration between those 2 events. If you want to play whith events, take a look at this sample page.
If you are interested in getting the ad load duration, I would recommend you to watch for the googletag.apiReady flag, which indicates wether the API is fully ready to be used or not (here). Combined with the slotResponseReceived, you should be able to get the data you are looking for.
Last : you might be interested in googletag.pubadsReady which indicates when the GPT service has been enabled (here)

Related

How to configure Dialogflow CX agent to receive multiple messages before replying to user

I've built a custom integration for Dialogflow CX which allows the user to send multiple messages to the Agent. However, the Agent doesn't understand what the user is trying to say when it receives more than one message.
How can I configure my Agent to wait a predetermined amount of time (allowing the user to send as many messages as possible) before trying to reply so that the Agent can make sense of all the text that was sent?
Unfortunately, that's not how Dialogflow-CX agents work. You can't wait a predetermined amount of time before answering: to each prompt from the user the agent will provide a fulfilment if it's specified.
The only way to achieve what you're asking is to develop an integration starting from the API they provide. You could develop an integration which waits a determined interval, joins all text received and sends it to the API via detectIntent request. This way you could have the user input multiple texts and only return a response when needed, but you'd need to handle the logic yourself (meaning a basic to intermediate knowledge of a programming language probably).

Amazon Connect Stop Call Recording

Is it possible to stop call recordings in Amazon Connect so the customer and agent can discuss sensitive material without being recorded?
I am aware of the set call recording behaviour blocks, but they don't seem to work on a call that has already been started with an agent with call recording enabled. Transferring to another contact flow with the recording type set to none doesn't seem to make a difference and the call carries on being recorded.
I am aware of the sample workflow Sample secure input with agent as outlined in this AWS blog https://aws.amazon.com/premiumsupport/knowledge-center/disable-recording-amazon-connect. This does work, however it relies on the customer entering payment details whilst the agent is on hold - preventing the agent and customer from having a sensitive conversation.
It seems the only way to stop recording once it has been enabled is to put the agent on hold?
Do not know if you have not solved your issue yet, but amazon has update their Amazon Connect API that would allow you to suspend the recording.
Boto3 implementation
response = client.suspend_contact_recording(
InstanceId='string',
ContactId='string',
InitialContactId='string'
)
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/connect.html#Connect.Client.suspend_contact_recording
They have also allow you to Start, Pause, Stop. (
We have just started to review this for a POC, turn recording off be default for a group of queues. Allow to Agents to start and stop and pause recording as needed.
You can also read this in an Amazon Blog post that should be able to help you fully implement the solution.
https://aws.amazon.com/blogs/contact-center/pausing-and-resuming-call-recordings-with-a-new-api-in-amazon-connect/#:~:text=is%20not%20recorded.-,End%20the%20call.,you%20start%20and%20stop%20it.
After speaking with Architects at AWS, the desired and designed for solution is to have the customer automatically enter sensitive information with the agent on hold and call recording turned off to remain PCI compliant.
If that is not an option there are workarounds possible that go against the way Amazon Connect has been designed. In order to turn off call recording once it has been enabled on a call, a new contact ID must be established. To do this you would need to transfer the user to your external phone number again or transfer to a queue and disable call recording in that new flow.
This brings in extra issues around how to get the customer back to the original agent once the sensitive information has been discussed. It also means you would potentially have 3+ contact IDs for the same transaction, with call recording spread across them.

How do I stop call recording for sensitive information In Amazon Connect

I am working on AWS's Amazon Connect. I am creating a contact flow in which I need to store call recordings. So I am using Enable Call Recording component of Contact Flow and its working fine.
Now, suppose contact flow is taking some sensitive information such as Credit card details, in this case I need to stop call recording and then again start it once user done with sensitive information. How can I do this?
Thanks,
Gans
You can disable recording in the contact flow by using the set recording behavior block, the same way you initially enabled it. This can be enabled or disabled as many times as needed during the contact flow itself, prior to routing the call to an agent. If you need to disable the recording after the call has already been routed at an agent, you would use a quick connect to send the caller back to a contact flow that set the recording behavior to disabled and use LEX or DTMF to capture the sensitive information before setting the recording back to an enabled state and reconnecting the caller to the agent (agent is placed on hold by using the quick connect in this situation).
The problem with the above approach is that it won't work well if you want the same agent to handle the call. The transfer to Quick Connect will put the call on hold on the original leg while reattempting to connect back to the same agent and unless the agent quickly clicks on the "swap" button on CCP the call will be dropped.
You could transfer back to another queue with recording off and the same agent pool, but this would mean the customer may have to wait again for the call to be connected.
A better solution would be an Interactive prompt with an option to disable recording and the start of the contact flow. The timeout could be set to continue with recording enabled so if nothing is pressed the call continues with recording on.
Routing to the last agent is still possible with temp table data store in DynamoDB. The agent have to be blocked to get calls routed from the queue until the contact re-arrives or the call will be placed in the personal (invisible) queue of the agent.
Use APIs that enable you to start, stop, pause, and resume call recording.
The call recording APIs are available in all AWS regions where Amazon Connect is offered. There is no charge to use these APIs. https://aws.amazon.com/about-aws/whats-new/2020/07/amazon-connect-adds-call-recording-apis/

Best way to retrieve active calls without making request each second?

We need to create a monitor that will show any income calls in our extranet in live time.
We were able to show active calls by using /account/~/extension/~/active-calls, however, to achieve what we need we would need to make a request each second which I guess will be blocked by rate limits.
Is there a better solution for it?
Thanks
Subscription (Push Notification) API resource empowers developers to enable the client application(s) to create a single subscription (to one or more extension's) and continually receive push notifications in real time for each subscribed extension.When using this approach for your application(s) to receive events on your RingCentral account, no polling is involved.
You can create a subscription using either of the below-mentioned transportType for receiving push notifications:
PubNub
WebHook
Notifications which the client wants to receive can be specified by the event filters which are set in the subscription request. The event filter is exposed as a URL, pointing to the required RingCentral API resource. Currently the following event types are available for notifications: extensions, messages and presence. They are described in detail below:
Notifications Event Types
You can take a look at the Subscription API below:
Subscription API
If you are interested in Subscribing to Push notifications via WebHook then we have an Easy-to-follow Quickstart guide here:
RingCentral Webhooks Quickstart Guide

Automate Suspended orchestrations to be resumed automatically

We have a BizTalk application which sends XML files to external applications by using a web-service.
BizTalk calls the web-services method by passing XML file and destination application URL as parameters.
If the external applications are not able to receive the XML, or if there is no response received from the web-service back to BizTalk the message gets suspended in BizTalk.
Presently for this situation we manually go to BizTalk admin and resume each suspended message.
Our clients want this process to be automated all, they want an dashboard which shows list of message details and a button, on its click all the suspended messages have to be resumed.
If you are doing this within an orchestration and catching the connection error, just add a delay shape configured to 5 hours. Or set a retry interval to 300 minutes and multiple retries on the send port if that makes sense. You can do this using the rule engine as well.
Why not implement an asynchronous pattern?
You make it so, so that the orchestration sends the file out via a send shape while initializing a certain correlation set.
You then put a listen shape with at one end:
- the receive (following the initialized correlation set)
- a delay shape set to 5 hours.
When you receive the message, your orchestration can handle it gracefully.
When you don't, the delay shape will kick in and you handle accordingly.
Benefit to this solution in comparison to the solution of 40Alpha will be that your orchestration will only 'wake up' from a dehydrated state if the timeout kicks in OR when the response is received. In the example of 40Alpha, the orchestration would wake up a lot of times, consuming extra resources.
You may want to look a product like BizTalk 360. It has those sort of monitoring and command built into it. I'm not sure it works with BizTalk 2006R2 though, but you should be thinking about moving off that platform anyway as it is going out of Microsoft support.