Is there way to view (or create) a log of users actions? Like who created/edited/deleted an item?
ex: I need to be able to see that "User A" changed the "Status Dropdown" from "In Progress" to "Complete" on 7/11/17 at 4pm.
Check out Project Tracker template(https://developers.google.com/appmaker/templates/project-tracker/), it demonstrates how to persist record changes in database.
Hovever you can log your actions using
// Server script
console.log('Your log entry goes here')
You can view your deployment logs by clicking View Logs button on the deployment card:
Each Model has events, so you can log user actions in this events:
**console.log(Session.getActiveUser().getEmail() + " updated status from " + record.status + " to " + oldRecord.status);**
Related
I need it to build a specific Events Flow - for certain buy-buttons that refer to corresponding paywalls and success-pages in order to find out what buttons/paywalls are more efficient.
My website is an SPA. I use History Change triggers instead of Page View triggers (Old/New History State is what changes when surfing web pages).
There is a chain of actions:
Paywall-button click from a /page-1 to /subscription;
Paywall view (History) on a /subscription;
Authorisation (eg. on a Form Subscription event) on a /subscription;
Subscription-button click on a /subscription;
Subscription success on a /subscription/success (let's name it "Subscription Success 1").
However, there are other ways to reach /subscription/success (let's call it "Subscription Success 2"). For example, when step-1's click occurs on a big set of other pages (not /page-1)).
On the step-5, I made a special Tag that tracks "Subscription Success 1". It is based on a Trigger-group-1 that tracks success page's URL and a Paywall-button click from step-1.
So, in order to track "Subscription Success 2", I need to set up a Trigger exception on either Trigger-group-1 or on a Trigger that is responsible for Paywall-button click on the step-1. But it doesn't work like this: "Subscription Success 2" Tag fires anyway.
How to solve it? How to persist that 1st step's event and use it as an exception?
You could create a cookie that will save a value for the first event and then use the value as a trigger/exception for your tag.
I have an application that I manage, that builds transactions for someone to download. The user downloading, may have to wait some time from the moment he/she hits build, till they are able to download. During this time, the page that they are on, auto refreshes about every 3 minutes. We feel that maybe users are manually refreshing as well.
We currently use Google Tag Manager (GTM) on this application and are wanting to track said behavior. Are users refreshing the page over and over again, until the screen shows that the transaction they were waiting for, is ready for them.
For example, this is what I'm hoping to see:
Category: foo-bar
Action**: Auto Refresh
Category: foo-bar
Action: Manual Refresh
There are multiple steps to achieve this.
1) Set up a form of data persistence (e.g. cookie, session storage or localStorage). In this example, I will use a cookie.
2) Save current page to the defined cookie. In this case previousPage.
3) Within the function that automatically reloads the page, include a method of identification that this occurred. In this example I will use a dataLayer push.
4) On the page load develop logic to determine, if the current page equals the previous page AND the dataLayer push (3) is not present.
Specifics:
2) Create a HTML script that fires on every pageload:
<script>
document.cookie = "previousPage= " + {{Page Path}} + "; path=/;";
</script>
Create a new variable called Previous Page.
1st-Party Cookie -> Cookie Name -> previousPage
3) Fire the below dataLayer push prior to GTM loading, if the page is automatically reloaded.
dataLayer.push({'automaticReload' : True})
Create a new variable called Automatic Reload.
Data Layer Variable -> Data Layer Variable Name -> automaticReload
4) Create a new Custom Javascript Variable named Reload:
function(){
if({{Page Path}} == {{Previous Page}}){
return true}
else{
return false}
};
Create two new events.
Event 1: Manual reload
Trigger:
Reload : equals : True
Automatic Reload : does not equal : True
Event 2: Automatic reload
Trigger:
Reload equals True
Automatic Reload equals True
I am building a Meteor application and am using the oaf:accounts-entry package to handle my user registration & authentication. I am working on the reset password function right now. However, when I click on "email reset password link", the application doesn't email me anything. Can someone help me or point me to instructions on how to configure the reset password function for the oaf:accounts-entry package? After doing a google search, I could not find instructions on how to configure it. The relevant packages I have installed are:
oaf:accounts-entry
accounts-password
email
Thank you!!
The password reset functionality should be working as it's provided by the package.
Have you properly configured your emails smtp settings and tested that your application is dispatching emails properly?
https://gentlenode.com/journal/meteor-3-smtp-configuration/5
NOTE: Using Meteor JS 1.6.1.1, package required are accounts-ui, accounts-password
To make forgot password link visible in the signup/sign in a widget, you need to do add little configuration in a file at location ROOT_FOLDER/client/main.js. The code is as below,
Accounts.ui.config({
passwordSignupFields: "USERNAME_AND_EMAIL"
});
If you do not choose passwordSignupFields: "USERNAME_AND_EMAIL" and choose something like passwordSignupFields: "USERNAME_ONLY", you won't be able to see forgot password option in the signup widget. (No one will tell you this, I discovered this weird scenario myself. Still, I wonder why MDG team did this? )
At Server end you also need to add little code at location PROJECT/server/main.js just outside Meteor.startup(()=>{}); to provide an email template for reset password link. Below is the code you need to adjust some properties yourself.
var username = 'you_id#gmail.com';
var password = 'your password';
var server = 'smtp.gmail.com';
var port = '465';
process.env.MAIL_URL = 'smtps://' +
encodeURIComponent(username) + ':' +
encodeURIComponent(password) + '#' +
encodeURIComponent(server) + ':' + port;
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
Accounts.emailTemplates.from = 'support_team#yourappname.com';
Accounts.emailTemplates.siteName = 'APP NAME';
Accounts.emailTemplates.resetPassword = {
subject(user) {
return "Reset Password Link.";
},
text(user, url) {
return `Hello!
Click the link below to reset your password.
${url}
If you didn't request this email, please ignore it.
Thanks,
APP Team.
`
},
html(user, url) {
// This is where HTML email content would go.
// See the section about html emails below.
}
};
STEP 1:
See if you are able to view forgot password on the signup widget as below.
STEP 2:
When you click "forgot password", you should be able to view below popup at same widget location as below.
on valid Email entry, you must see a success full notification and most importantly you must receive a mail for reset password link as below.
Step 3:
When you click on the link, you can see a new window with a popup as below (NOTE: You must click the link before given token expiry time).
Voila!!! just add a new password and you automatically login to given page. Everything is already provided to us as discussed above by Meteor. You just need to configure the stuff and get it running.
I have an app that sends events when something failed to google analytics. I can see the events, they all have the category "* Failed", whit * meaning whatever part of code I want.
How can I make an automated alert that will send me an email on the google analytics website whenever there are new * Failed events? The problem is what to choose on the "Alert me when" section.
thanks.
Couldn't you do Unique Events or Total Events is greater than 0?
How can I automatically send an email to an user when I unblock him (status becomes active) ?
I've searched the appropriate rule, but I couldn't find the correct condition (there is not a token with the user "status" or "block / unblock" property.
thanks
Add event: User account details have been updated
Add condition "Execute custom PHP code", write there code:
return !$account_unchanged->status && $account->status;
Add your action about sending email.