Apply from date & to date filter while getting Lead Activities in marketo - marketo

I want to integrate MARKETO api in my .net project. I want to retrieve lead activities based on from date & to date parameter but when I call Lead Activities method is return all activities.
Is there any way to add from date & to date parameter?

The Since Date for Get Lead Activities is represented by a paging token. There is no end date, you just stop retrieving activities when you have one which is greater than your desired end date.

Related

Alerts in Metabase - Input variable based reports

We have created alerts (for reports without input variables, like stock report) in metabase and are working fine.
We have created sales reports for client which is based on date range.
Now client ask for alerts on sales reports on daily basis, that means, default value for From & To date should be Today's date.
We have set alerts but not getting in our mailbox.
Can you please let me know how can i achieve this?
Today's date as default value in input variable
Get report in my inbox every morning.
I have removed variables and used cast(now() as date) to get data for current date and alert was set at EOD, so it is working as expected.
After doing this when i set alerts, i got report in my inbox at scheduled time.

Google analytics API: different sum of sessions with 'ga:eventLabel' function and without it

I added 'ga:eventLabel' function to my script and sum of sessions decreased from 2238 to 994. Why?
I expect the same result from both script
dim=['ga:eventLabel', 'ga:source','ga:sourceMedium']
met=['ga:sessions', 'ga:users']
start_date='2019-07-01'
end_date='2019-07-03'
transaction_type='Goal'
goal_number=''
refresh_token=token
condition=''
data_2=google_analytics_reporting_api_data_extraction(viewID,dim,met,start_date,end_date,refresh_token,transaction_type,goal_number,condition)
viewID='*********'
dim=['ga:source','ga:sourceMedium']
met=['ga:sessions', 'ga:users']
start_date='2019-07-01'
end_date='2019-07-03'
transaction_type='Goal'
goal_number=''
refresh_token=token
condition=''
data=google_analytics_reporting_api_data_extraction(viewID,dim,met,start_date,end_date, refresh_token,transaction_type, goal_number,condition)```
Here are the results:
--
The two queries have two different meanings, and won't give you the same result, unless you have a data set, where all sessions have at least one event type hit associated with them.
The first query says: count all my users and sessions for the given date range, breaking it down by event label, source, source/medium and date. So in this case, you implicitly filter for any known event labels, where (not set) is an empty, but existing label for a recorded event. Sessions without any events are excluded.
The second query says: count all my users and sessions for the given date range, breaking it down by source, source/medium and date (regardless, if they had any events).
You can verify this behavior, if you create these custom reports in Google Analytics web UI. It is similar to querying custom dimensions: if no value was set for a given custom dimension, those records are excluded.

drupal 8 views date range filter - 'is between' operator not inclusive for end date

I have an Event content type with a Date range field. I created a view of events and added an exposed filter for the Date Range field. I used the operator 'is between', so the user can enter a start date and end date to search between.
If the event starts on 1/1/11 at 9am and ends on 1/1/11 at 5pm, I want this event to show up when the user filters for events between 1/1/11 and 1/1/11.
But there are no results unless you change the end date to something greater than 1/1/11. I know this makes sense according to the 'is between' filter but I don't think it will be intuitive for users.
Can anyone help me with a way to make the end date inclusive, so it includes events on the end date specified??
I'm using the datetime_range module, and I've patched it with #60 at https://www.drupal.org/node/2786577 to enable date range filtering with views.
Thank you
I believe you're going to need the Views Date Filter Datetime Granularity Option patch (until it gets committed) as well as the change from The Views integration Datetime Range fields should extend the views integration for regular Datetime fields, which is now in Drupal core 8.6+.
For even better UX, see Exposed views date filter with offset not working as expected

Google Docs Forms - need Pre-fill Date & Time Entry with current date and current time

Google Forms I need Pre-filled current Date & current Time Entry in date and time fields of my google form. How to do it
My solution is to make the Date field optional. The default is to assume the todays date which is what you get from the timestamp field. In case it needs to be anything else you can enter it manually.
A simple code-free solution is to make separate sections in your form and use the feature that routes users to different sections based on responses. The first section asks whether the form is for the current date/time. If yes, you use the timestamp as the date and time and route the user to the main section with your questions. If not, route them to a section to set the date and time, and then after that route them to the main section.
2023 Solution
-Google Forms has updated how dates are passed through URL parameters.
Instead of passing each component of a date as a separate param, you now pass them using the same syntax as all other fields using the YYYY-MM-DD format for your date value.
Here is an example URL:
`https://docs.google.com/forms/d/e/${formId}/viewform?usp=pp_url&entry.${dateEntryFieldID}=${YEAR}-${MONTH}-${DAY}`

Drupal Commerce: renew role / subscription

We are selling a product using Drupal Commerce that will renew yearly, but not automatically (expensive, users will likely use POs). Right now, after purchase, they will receive the appropriate role based on their purchase for 1 year.
If they pay before the end date, I would like them to get an additional, non-overlapping year.
I would like a solution that is independent of payment type because some things will be done manually.
I had implemented such a solution before. There was a subscription for a year,two years & three years. The problem was how to maintain the subscription limit & how to extend it.
The solution was creating a hidden field within for every user. When a user first buys a package for a year we programatically make a entry of the end timestamp in the end field. When he buys one more package the current timestamp value of the field is added by additional timestamp
timestamp = timestamp + 1years timestamp
or
timestamp = timestamp + 2years timestamp
Hope this helps you

Resources