1

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.

1

You'll need to use CloudPagesURL in the email to the landing page to pass the parameters to the CloudPage.

<a href="%%=RedirectTo(CloudPagesURL(1234))=%%" alias="Link">Link to landing page</a>

CloudPagesURL will pass the _subscriberkey, jobID, and memberid used in your AttributeValue function.

| improve this answer | |
  • If we use memberid, it is fetching only the Parent BU name not the Child BU Name. So I Stored all the BU names in a DE and fetching from there. Now I want to fetch the landing page names in the same format (Storing and Fetching from a DE). I'm confused here, how to fetch the data from two DE's? For fetching BU details code is below Set lookUp = LookupRows('Page Visits','Subscriber Key', Subs,'jobid', jobid) SET lookupvalue = LookupRows('BU Details','memberid', memberid) IF Rowcount(lookupvalue) >0 THEN SET BURow = Row(lookupvalue, 1) Set BUName = Field(BURow, 'BUName') ENDIF – sai Mar 19 at 5:08
  • Is the landing page on the Parent BU and you're trying to retrieve from a Child BU? – Jackson Chen Mar 19 at 5:11
  • No,Landing page is in Child BU and trying to retrieve from a Child BU only. And using memberid from child BU retrives only Parent BU name. – sai Mar 19 at 5:20
  • Try using the v function to see if the variables are being populated. For example, %%=v(@memberid)=%%. Your lookup may not be working if those parameters are not passed. Which is why I put the solution as to use CloudPagesURL – Jackson Chen Mar 19 at 5:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.