Email

From Wasya Wiki
Jump to: navigation, search

email validation regex (js)

/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/

email validation regex (ruby)

/\A[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+\z/i

Email tracking

From: https://developers.google.com/analytics/devguides/collection/protocol/v1/email From: https://dyn.com/blog/tracking-email-opens-via-google-analytics/

<img src="https://www.google-analytics.com/collect?v=1&..."/>

http://www.google-analytics.com/collect?v=1&tid=UA-12345678-1&cid=CLIENT_ID_NUMBER&t=event&ec=email&ea=open&el=recipient_id&cs=newsletter&cm=email&cn=Campaign_Name

URL Component 		Explanation
v=1 			Protocol version within Google Analytics
tid=UA-12345678-1 	Your Google Analytics Tracking ID
cid=CLIENT_ID_NUMBER 	A systematic tracking ID for the customer
t=event 		ells Google Analytics this is an Event Hit Type
ec=email 		The Event Category helps segment various events
ea=open 		The Event Action helps specify exactly what happened
el=recipient_id 	Event Label specifies a unique identification for this recipient
cs=newsletter 		Campaign Source allows segmentation of campaign types
cm=email 		Campaign Medium could segment social vs. email, etc.
cn=Campaign_Name 	Campaign Name identifies the campaign to you