Currently I'm fetching the Clicks for a landing page into a DE,
=== Email to fetch subscriber key ====
Hi,<br>
<br>
%%[SET @Sub = _subscriberkey SET @ClickPage = concat('https://fe91137376640d7a74.pub.s7.sfmc-content.com/o0tkjefs5c4?sub=',@Sub)]%% We are tracking landing pages, Please <a alias="" conversion="false" data-linkto="https://" href="%%=RedirectTo(@ClickPage)=%%" style="color:#1010EE;text-decoration:none;" title="">Click Here</a>
==== Landing Page =====
<html>
<head>
<meta charset="utf-8">
<title>My Landing Page</title>
%%[
set @Subs = RequestParameter('sub')
set @JobId = RequestParameter('ji')
set @memberid = RequestParameter("memberid")
InsertData('Page Visits','Subscriber Key', @Subs,'jobid', @jobid,'memberid', @memberid, 'Event Date', SystemDateToLocalDate(Now()))
]%%
</head>
<body>
<h1>Thanks for visiting!</h1>
</body>
</html>
The above code is working good, IF I add JOB ID in the email, which is not tracking the Job Id (below code)
==== Email to fetch JobID ====
Hi,<br>
<br>
%%[SET @Sub = _subscriberkey
SET @JID = JobId
SET @ClickPage = concat('https://fe91137376640d7a74.pub.s7.sfmc-content.com/o0tkjefs5c4?sub=',@Sub,'?ji=',@JID)]%% We are tracking landing pages, Please <a alias="" conversion="false" data-linkto="https://" href="%%=RedirectTo(@ClickPage)=%%" style="color:#1010EE;text-decoration:none;" title="">Click Here</a>
Is there anything I'm missing in the JOB ID email Code?
Thanks in advance
CloudPagesURL
function? It will pass a bunch of parameters automatically: ampscript.guide/cloudpagesurl