> For the complete documentation index, see [llms.txt](https://support.emarketeer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.emarketeer.com/docs/docs_se/referens/developer-advanced/dcl-introduction/emarketeer-specific-functions.md).

# eMarketeer-specifika funktioner

## Link

För att spåra en länk i eMarketeer, använd `link`-funktionen. En vanlig `<a href="url">Link</a>` renderas fortfarande, men den spåras inte. Kommandot `link` ser ut så här:

```
<% link url="url-to-link" caption="Label to link" [attrib="htmlattributes"] [html="true"] %>
```

* `url`: URL:n att länka till. Den måste vara URL-kodad; eMarketeer kodar den inte åt dig.
* `caption`: länkens etikett, som vanlig text eller HTML. Om det är HTML, skicka `html="true"`.
* `attrib`: attribut som läggs till i den resulterande `<a>`-taggen i den renderade HTML-koden.

## Contact

`contact`-funktionen hämtar eller skriver ut värden från kontaktkortet som formuläret är kopplat till.

```
<% contact field="fieldname" %>
```

`fieldname` är ett av dessa:

<table><thead><tr><th width="130" valign="top">Fieldname</th><th>Explaination</th></tr></thead><tbody><tr><td valign="top">firstname</td><td>Firstname of contact</td></tr><tr><td valign="top">lastname</td><td>Lastname of contact</td></tr><tr><td valign="top">salutation</td><td>How to salute this contact. For example "Mr", "Mrs"</td></tr><tr><td valign="top">company</td><td>This contacts work company</td></tr><tr><td valign="top">email</td><td>Email address of contact</td></tr><tr><td valign="top">title</td><td>Work title</td></tr><tr><td valign="top">telephone</td><td>Contacts telephone number</td></tr><tr><td valign="top">fax</td><td>Contacts fax number</td></tr><tr><td valign="top">mobile</td><td>Contact mobile telephone number</td></tr><tr><td valign="top">address1</td><td>First line in contacts address</td></tr><tr><td valign="top">address2</td><td>Second line in contacts address</td></tr><tr><td valign="top">city</td><td>City of contact</td></tr><tr><td valign="top">state</td><td>State of contact</td></tr><tr><td valign="top">zip</td><td>Zip or postal code of contact</td></tr><tr><td valign="top">country</td><td>Country of contact</td></tr><tr><td valign="top">external_id</td><td>Id in users CMS</td></tr><tr><td valign="top">note</td><td>Your note of this contact</td></tr></tbody></table>

Anpassade kontaktfält använder denna syntax:

```
<% contact field="fieldname" type="custom" %>
```

Om du är osäker på rätt fältkod, öppna ett e-postmeddelande och använd den inbyggda personaliseringsknappen i valfri text. Den visar rätt kod för varje fält.

## User

`user`-funktionen hämtar eller skriver ut information om ditt användarkonto.

<table><thead><tr><th width="130" valign="top">Fieldname</th><th>Explaination</th></tr></thead><tbody><tr><td valign="top">logo</td><td>The url to your companys logo in emarketeer takes a second argument "version" which can be "light" or "dark". The light background logo is the default</td></tr><tr><td valign="top">company</td><td>Company name</td></tr><tr><td valign="top">address1</td><td>First address line of company</td></tr><tr><td valign="top">address2</td><td>Second address line of company</td></tr><tr><td valign="top">city</td><td>City of company</td></tr><tr><td valign="top">zip</td><td>Zip or postal code of company</td></tr><tr><td valign="top">state</td><td>State of company</td></tr><tr><td valign="top">country</td><td>Country of company</td></tr><tr><td valign="top">webpage</td><td>Homepage of company, optional argument "protocol" may be set to true to include protocol in adress (Normaly <a href="https://github.com/eMarketeerSE/support-doc/blob/main/sv/documentation/apis-developer/http:/README.md">https://</a>)</td></tr><tr><td valign="top">url</td><td>Url this user uses to access emarkeeter.</td></tr><tr><td valign="top">telephone</td><td>Tehephone number of company</td></tr></tbody></table>

## Scramble

Scramble-koden är en unik identifierare som genereras när ett e-postmeddelande skickas. eMarketeer använder den internt för att identifiera vilken kontakt som klickar på en länk i e-postmeddelandet.

## Block

`block`-funktionen hämtar specifik data från ett block i eMarketeer. Olika blocktyper exponerar olika fält. Funktionen returnerar den bokstavliga strängen som skrivits in i blocket, inte utvärderad kod.

```
<% block name="text1" field="text" %>
```

Argumentet `name` är en relativ sökväg till blocket du vill ha, med start i den aktuella noden i trädet. Noder separeras med `.`. Nyckelordet `parent` är reserverat och flyttar upp en nivå. Till exempel:

```
<% block name="parent.block1.text2" field="text" %>
```

Den här sökvägen går från den aktuella noden upp till det överordnade containerblocket, sedan in i `block1` och sedan in i textblocket `text2`.

Om argumentet `name` börjar med `.`, börjar uppslagningen från roten. Till exempel:

```
<% block name=".block1.text2" field="text" %>
```

Den här sökvägen löser alltid från roten, oavsett var du börjar.

**Text Block**

<table><thead><tr><th width="130" valign="top">Fieldname</th><th>Explaination</th></tr></thead><tbody><tr><td valign="top">text</td><td>The text entered into the text block</td></tr></tbody></table>

**Image Block**

<table><thead><tr><th width="130" valign="top">Fieldname</th><th>Explaination</th></tr></thead><tbody><tr><td valign="top">url</td><td>the url of the image</td></tr></tbody></table>

**Link Block**

<table><thead><tr><th width="130" valign="top">Fieldname</th><th>Explaination</th></tr></thead><tbody><tr><td valign="top">url</td><td>the url of the link</td></tr><tr><td valign="top">caption</td><td>the link caption</td></tr></tbody></table>

**Container Block**

<table><thead><tr><th width="130" valign="top">Fieldname</th><th>Explaination</th></tr></thead><tbody><tr><td valign="top">text</td><td>Returns the HTML source code of the block</td></tr></tbody></table>

**Option Block**

<table><thead><tr><th width="130" valign="top">Fieldname</th><th>Explaination</th></tr></thead><tbody><tr><td valign="top">value</td><td>Current value of the option block</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.emarketeer.com/docs/docs_se/referens/developer-advanced/dcl-introduction/emarketeer-specific-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
