Adding tracklink to mailto CTA - javascript

In order to send bulk emails we use listmonk a self-hosted newsletter and mailing list manager. We use trackers to track any urls that are being clicked by users by using #TrackLink. The documentation for the same can be found here
We want to include a tracklink in our listmonk template using an HTML anchor tag, such as Send email. However, when a user clicks on the link, the text "#Tracklink" is being inserted into the email body.
issue screenshot
Is there any solution for adding track links to mailto attributes or is there any other way to track or insert tracklinks in mailto attribute ?
Sending emails

Related

How to retrieve longDynamicLink from suffix Firebase Dynamic Links

I have created a dynamic link using firebase for eg:
https://fineshopdesign.page.link/hob
And the long url of this suffix is:
https://fineshopdesign.page.link/?link=https://www.houseofblogger.com/&st=HOB+x+FD&sd=Hii,+it%27s+HOB+(House+Of+Blogger)&utm_campaign=ghgh&utm_medium=ghgh&utm_source=ghgh
Now, I want to retrieve long url from short suffix so that before redirecting the user to link, I could get some information of the link and after making sure I will allow user to open the link in my web web. For eg. if the querystring has link which matches a regex.
Is it possible to get the longDynamicLink from shortLink using javascript?
I searched for it on Dynamic Links Documentation but didn't get any way.

Google Email: Button/Link which trigger a script for sheet

I am looking for a way to send an email with Google App Script (I know how to do that) which includes an approval button/link. When the user clicks the link/button in the email to approve the request, I want to trigger a script (this is the part I do not know if possible from email) which goes back to the Google Sheet and changes a value in a cell.
Example:
User A submits a request using google form, and a new row is appended in SheetA. With some formulas, I automatically associate an ID = X to that request/row. A script will then send an email to user B to ask to approve the request of user A. User B will click a link in the email and the script will find the record X in SheetA and update a value in that row.
You can create a simple web app, using code like
function doGet(e) {
params = e.parameter;
var range=e.parameter.range;
var value=e.parameter.value;
SpreadsheetApp.openById('SHEETID').getRange(range).setValue(value);
return HtmlService.createHtmlOutput(`<b>${range}</b> set to <b>${value}</b>`);
}
publish it with "execute as me", "everyone, even anonymous" options,
and then exec it using a link
https://script.google.com/macros/s/SCRIPTID/exec?range=B1&value=100
Example sheet:
https://docs.google.com/spreadsheets/d/1jNEzil1dOtXj-Qc5ZVcZnd1fwGQ7V18irWIsH9G8to8/edit?usp=sharing
Update link:
https://script.google.com/macros/s/AKfycby5KYzQELQNS0y0uf0CwjwzoWkabCJywqkpph7wUUXoTGjERUg/exec?range=Sheet1!B1&value=500
I don't know of a prefect way to do this, but with a small work-around, it is possible.
Instead of "clicking an Approve button," the user could click an Approve link. This link would open a Google Form that is pre-filled with the a request ID and Marked as Approved. All they would need to do is submit the pre-filled form. The email would also contain a Reject link that would also pre-fill the request_id and mark Reject. (I recommend radio buttons for this question)
Then set up a trigger onFormSumit(). for this form that makes the appropriate edits to the spreadsheet when a user submits this form.
If you wanted to make the solution even more complicated, but perhaps avoid the second click, the links could be to a WebApp and you could code the site to automatically record the data in the url to Google sheet.
PS: Both solutions also work as a way to get read receipts for emails sent from Google Scripts.

Cross Domain form submit Google Tag Manager auto trigger

I have some problem while getting data from another site. In this case I want to get the reservation data from the booking engine site and they want to pass the data to me with Google Tag Manager. I don't really understand what I should do when they just need GTM code. What I should create in my server to get the data from the booking engine with Google Tag Manager ?
This is the illustrations:
I have two sites called sites1.com and sites2.com. In sites1.com I put the Google Tag Manager scripts to push form submit data like full name, last name, email, etc. After somebody submit the form I want to get the submited data in sites1.com to sites2.com with Google Tag Manager. My problem is how to get the data after somebody submited the form in sites1.com in my sites2.com ?
Please anybody knows how to resolve my problem . Thanks in advance .
Well if they implement your GTM from site2.com into site1.com all you need to do is:
Create a trigger for the submit button on the form (use the ID o class of the element and check for the that the Page URL contains site1.com/)
Create a tag where you want the information to be send
Scrap the fields with javascript or ask them to push to the dataLayer the information you need (in this case you can build the trigger based on this event)
And SUPER important: check all your triggers so no other tag fires on site1.com
2.1:
Im not sure if i get where you want this information to be stored but keep in mind GA does not accept PII. On the other hand if you want this in some DB you can just create and endpoint and send the information as parameters. Example:
site2.com/booking_info?field1={{DL variable}}
And just use a Custom IMG tag.
Ive made something like this using API Gateway, Lambda and DynamoDB and it took me 15 mins to set up. (just to give you perspective)
-- EDIT:
Ones you have the information avaliable you can send it to your database using two methods:
Using a HTML tag and making a request with javascript
Making a request with a custom image tag
On the past i ve just added the URL with parameters where you want the request to be made on an image tag and worked perfectly for me.
-- More info:
The custom image tag requests an image from a particular URL. The interesting part is that by making the request you’re actually transmitting information to a server. For example, if you request an image via URL https://www.example.com/something?parameter1=good&parameter2=123, the receiving server processes parameter1 and parameter2 and acts accordingly (e.g. registers those parameters as an event).
Source.

How can i send email with dynamic html content?

I am sending simple html templated emails to users, now i want to include text box and submit button in my email template. user can put text in textbox in email and submit data, that data will save in my database. How can i do this? any suggestions?
Add a link in your email content to redirect on the form in browser.
Look on this website to understand why put a form in an email is not good way : Send a Form via Email
Add a link to redirect them to browser form is nicer, and you can add some variable at the URL to recognize the user too like http://testingsite.com/form?user=xxx, so that u can know who is the user and pre-filled date or them.

Sharepoint: access subsite page contact from workflow

I'm trying to create a work flow that will send an email to the users in the contact field for the page that the initial link was followed from.
In other words, a user clicks a link on page ../top/sub/pages/page1.aspx which takes them to a form here: ..top/lists/feedback/newform.aspx. Once they submit the form on the top level page it starts a workflow (at ..top/lists/feedback/) which will email the users in the meta data for the referrer page (../top/sub/pages/page1.aspx) and finish by deleting the feedback item.
My problem lies in trying to email the correct user. I have tried to make a work-flow on the sub-site, but it seems like the work-flow has ZERO access outside of its directory.
My next idea would be to try and send the user as a parameter (as part of the form) using a script, but I'm unsure of how to access the information I need.
How would I access the page's contact user? Am I even on the right track?
ps. I dont have access to the server and therefore am unable to use visual studio
Probably there might be some dirty workaround.
add a hidden field to you top/lists/feedback/
add a delegate control that stores the contact on the page the user came from i.e. in the user session (or somewhere in SharePoint or in DB) and place the control on the pages ../top/sub/pages/ (or place it everywhere but make it work only on the pages)
add an itemeventreceiver in the list ..top/lists/feedback/ that grabs what the delegate control saved and inserts it into the hidden field in the item that is created in the ..top/lists/feedback/newform.aspx
use the hidden field in the wotkflow.
I hope you can either accept it or generate you own idea reading my answer.
Good luck!

Categories