Skip to content

Instantly share code, notes, and snippets.

@ardani
Created May 11, 2021 07:51
Show Gist options
  • Save ardani/0889b7061870584cc242dd9bfa106a54 to your computer and use it in GitHub Desktop.
Save ardani/0889b7061870584cc242dd9bfa106a54 to your computer and use it in GitHub Desktop.
export code power suite rank tracker
<[DEFINE name="dateFormat" value="exportData.createDateFormat('yyyy-MM-dd')"/]>
<[DEFINE name="keywords" value="exportData.keywords"/]>
<[DEFINE name="searchEngines" value="exportData.searchEngines"/]>
date,keyword,search_engine,rank
<[FOR_EACH name="keywords" id="keyword"]>
<[FOR_EACH name="searchEngines" id="searchEngineType"]>
<[DEFINE name="history" value="keyword.getHistory(searchEngineType)"/]>
<[FOR_EACH name="exportData.reverse(history)" id="historyRecord"]>
"<[ECHO text="dateFormat.format(historyRecord.checkDate)"/]>",<[ECHO text="keyword.query"/]>,<[ECHO text="searchEngineType.getName()"/]>,<[DEFINE name="position" value="exportData.getPosition(historyRecord)"/]><[IF condition="position != null"]><[THEN]><[ECHO text="position"/]><[/THEN]><[/IF]>
<[/FOR_EACH]>
<[/FOR_EACH]>
<[/FOR_EACH]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment