I'm trying to track the landing pages opens/clicks data into a Data Extension. I'm fetching the CHILD BU details and LANDING PAGE details through two DE's (here I'm storing and fetching the data )and inserting into a DE along with the subscriber key and JOB ID.
** Code in the Email **
%%[ SET @Sub = _subscriberkey SET @CloudPageID = 1234]%%
** Code in the Landing Page **
<html>
<head>
<meta charset="utf-8">
<title>My Landing Page</title>
%%[
set @Subs = AttributeValue('_SubscriberKey')
set @JobId = AttributeValue('jobID')
set @memberid = AttributeValue("memberid")
set @pageURL = RequestParameter("PAGEURL")
Set @lookUp = LookupRows('Page Visits','Subscriber Key', @Subs,'jobid', @jobid)
SET @variableA = LookupRows('BU Details','memberid', @memberid)
SET @variableB = LookupRows('Landing Page Details','CPID',@CPID)
IF Rowcount(@variableA) >0 THEN
SET @BURow = Row(@lookupvalue, 1)
Set @BUName = Field(@BURow, 'BUName')
ENDIF
IF Rowcount(@variableB) >0 THEN
SET @CPRow = Row(@lookupvalue1, 1)
Set @CPNAME = Field(@CPRow, 'CPNAME')
ENDIF
IF RowCount(@lookUp) == 0 THEN
InsertData('Page Visits','Subscriber Key', @Subs,'jobid', @jobid,'memberid', @memberid, 'BUName', @BUName , 'pageURL', @pageURL,'CPNAME', @CPNAME,'Event Date', NOW())
ENDIF
]%%
</head>
<body>
<h1>We are tracking your landing page!</h1>
</body>
</html>
Please help where I'm doing wrong.